在 Android 中的好友墙上的 Facebook 帖子 [英] Facebook post on Friends wall in Android
本文介绍了在 Android 中的好友墙上的 Facebook 帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我朋友的墙上贴一张照片.
I would like to post a picture to my friend's wall.
但我登录到我的帐户说 test@gmail.com,但现在我想在我的任何朋友墙上发帖.
But I logged in to my account say test@gmail.com, but now I want to post on to any of my friend wall.
我有我所有朋友的 ID 和姓名.
I am having all my friends id and Name.
是否可以通过登录我的帐户在朋友墙上张贴图片?如果是这样怎么可能?
Is it possible to Post a picture in friends wall by logged to my account? If so how is it possible?
推荐答案
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){}
这篇关于在 Android 中的好友墙上的 Facebook 帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文