Facebook上的帮助发贴给Android中的朋友 [英] Help on Facebook Post to friends in Android
本文介绍了Facebook上的帮助发贴给Android中的朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Android的新手。我想使用Facebook向我的朋友墙发布图片。
I am new to Android..I would like to Post a Image to my friends Wall using Facebook.
我已经从GitHub源码下载了代码。在我的帐户中说peter@gmail.com,并抓住我所有的朋友列表,并填写列表视图中的所有朋友。
I have downloaded code from GitHub source..I logged in my account Say peter@gmail.com and grab all of my friends list and populate all my friends in List View..
我有所有朋友的ID和姓名...
I am having ID's and Name's of all friends...
我想在任何一个朋友墙上发布图片。
I want to post a image in any one of my friend Wall..
谢谢。
推荐答案
尝试这样:
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上的帮助发贴给Android中的朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文