在我的 android 应用程序中,我想在用户 Facebook 墙上发布一些内容,然后单击用户必须重定向到网站的帖子。但现在它被重定向到我的应用程序。我该如何解决这个问题。请帮助我。提前致谢.
用于在墙上分享的代码是
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();