帮助在Facebook上张贴到Android的朋友 [英] Help on Facebook Post to friends in Android

查看:90
本文介绍了帮助在Facebook上张贴到Android的朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来Android..I想发布图片给我的朋友沃尔使用Facebook的。

I am new to Android..I would like to Post a Image to my friends Wall using Facebook.

我已经下载code登录我的帐户说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..

Thanks..Pet​​er ..

Thanks..Peter..

推荐答案

试试这个:

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){}

另外,请查阅本作参考<一个href=\"http://stackoverflow.com/questions/5896863/post-on-users-friends-facebook-wall-through-android-application\">Post对好友留言

这篇关于帮助在Facebook上张贴到Android的朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆