2
我想將照片發佈到我朋友的牆上。安卓朋友牆上的Facebook貼子
但我登錄到我的帳戶說[email protected],但現在我想張貼到我的任何朋友牆上。
我有我所有的朋友id和名稱。
是否可以通過登錄我的帳戶在朋友牆上發佈圖片?如果是這樣怎麼可能?
我想將照片發佈到我朋友的牆上。安卓朋友牆上的Facebook貼子
但我登錄到我的帳戶說[email protected],但現在我想張貼到我的任何朋友牆上。
我有我所有的朋友id和名稱。
是否可以通過登錄我的帳戶在朋友牆上發佈圖片?如果是這樣怎麼可能?
try{
Bundle parameters = new Bundle();
JSONObject attachment = new JSONObject();
try {
attachment.put("message", "Messages");
attachment.put("name", "Get utellit to send messages like this!");
attachment.put("href", link);
} catch (JSONException e) {
}
parameters.putString("attachment", attachment.toString());
parameters.putString("message", "Text is lame. Listen up:");
parameters.putString("target_id", "XXXXX"); // target Id in which you need to Post
parameters.putString("method", "stream.publish");
String response = authenticatedFacebook.request(parameters);
Log.v("response", response);
}
catch(Exception e){}
一般而言,Facebook SDK以及Android版本都允許您這樣做。請參閱示例代碼here。
我不確定,但我認爲facebook SDK沒有方法發佈在朋友的牆上..你可以做的是,發佈在你自己的牆上,自動出現在新聞或主頁上,最終你的frnd會能夠看到它。 – Ankit 2011-03-14 06:11:45