0

私のAndroidアプリケーションで、ユーザーのFacebookウォールに何かを投稿したいのですが、投稿をクリックすると、ユーザーはWebサイトにリダイレクトする必要があります.しかし、今ではアプリにリダイレクトされています.どうすれば修正できますか.助けてください.よろしくお願いします.

ウォールでの共有に使用されるコードは

Bundle postParams = new Bundle();
                postParams.putString("name", "");
                postParams
                        .putString(
                                "caption",
                                "");
                postParams.putString("link", "http://www.something.com/");
                Request.Callback callback = new Request.Callback() {
                    public void onCompleted(Response response) {

                        FacebookRequestError error = response.getError();
                        if (error != null) {

                        } else {
                            JSONObject graphResponse = response
                                    .getGraphObject().getInnerJSONObject();
                            String postId = null;
                            try {
                                postId = graphResponse.getString("id");
                                Log.i("TAG", "postId " + postId);
                            } catch (JSONException e) {
                                Log.i("TAG", "JSON error " + e.getMessage());
                            }
                        }

                    }
                };

                Request request = new Request(session, "me/feed", postParams,
                        HttpMethod.POST, callback);

                RequestAsyncTask task = new RequestAsyncTask(request);
                task.execute();
4

1 に答える 1

0

できません。Facebook では、Facebook アプリ ページとは別に外部 URL を投稿することは許可されていません。ただし、外部画像 URL を使用して画像を投稿できます。例えば

postParams.putString("picture", "http://some/image_url");
于 2013-05-10T04:57:24.847 に答える