2011-05-22 89 views
4

我正在使用Faccebook android API(com.facebook.android)在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()); Android:發佈Facebook API

一切工作正常。我可以登錄併發布消息,但是登錄後,它會顯示一箇中間對話框「發佈故事」,其中帶有我的帖子msg的「發佈故事」,這是用戶可編輯的「測試帖子」,但我想在登錄後立即發佈消息,而無需使用此中間發佈屏幕。

任何人都可以幫助我如何實現這一目標。

感謝, nehatha

+0

@BilltheLizard我的回答總是幫助所有和代碼是如此之大,讓我沒有張貼在這裏,我將今後不要更改我的博客帖子網址,因此刪除我的答案是完全不可靠的。 – 2012-07-06 12:54:30

回答

1

這是你如何做到這一點:

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