4

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 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

Venkat Papana
  • 4,757
  • 13
  • 52
  • 74
  • @BilltheLizard my answer is always helping to all and the code is so big so that i was not posted here and i will not change my blog post url in future so deletion of my answer is totally unreliable. – Dipak Keshariya Jul 06 '12 at 12:54

1 Answers1

1

This is how you do it:

    Bundle bundle = new Bundle(3);
    bundle.putString("message", "Hello!");
    mFacebook.request("me/feed", bundle, "POST");
BoD
  • 10,838
  • 6
  • 63
  • 59