开发者

Android: Facebook API to post

开发者 https://www.devze.com 2023-03-07 08:00 出处:网络
I am using Faccebook android API (com.facebook.android) to post the messages on facebook. Facebook mFacebook = new Facebook(Constants.APP_ID);

I am using Faccebook android API (com.facebook.android) to post the messages on facebook. Facebook mFacebook = new Facebook(Constants.APP_ID); AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(mFacebook); Bundle parameters = new Bundle(); parameters.putString("message", "this is a test post");// the message to post to the wall mFacebook.dialog(this, "stream.publish", parameters, new SampleDialogListener());

Everything is working fine. I'm able to login and post 开发者_JAVA百科the message, but after login, it is displaying a intermediate dialog, "Publish story" with a text box with my post msg, "this is a test post" that is editable by the user, but i want to post the messages immediately after login without having this intermediate post screen.

Can anybody help me how to achieve this.

Thanks, nehatha


This is how you do it:

    Bundle bundle = new Bundle(3);
    bundle.putString("message", "Hello!");
    mFacebook.request("me/feed", bundle, "POST");
0

精彩评论

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