开发者

How to post message to facebook wall from android fb sdk [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably ans开发者_如何学编程wered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

Hi everyone I found this is working.

                    Bundle parameters = new Bundle();
                    parameters.putString("message", "This is a test message.");
                    mFacebook.request("me/feed", parameters, "POST");


This is full code.

Facebook mFacebook = new Facebook(FACEBOOK_APP_ID);
SessionStore.restore(mFacebook, mContext);

try {
    TextView post_edit = (TextView)findViewById(R.id.post_edit);
    String message = String.valueOf(post_edit.getText());
    Bundle parameters = new Bundle();
    parameters.putString("message", message);
    mFacebook.request("me/feed", parameters, "POST");
} catch (Exception e) {
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜