如何在Android中在facebook好友墙上发布消息

如何在Android中在facebook好友墙上发布消息,android,facebook,Android,Facebook,可能重复: 我制作了一个应用程序,其中我正在获取我所有FACEBOOK好友的列表,现在我想在我点击任何好友行时,我将能够在他/她的墙上发布 那么我需要授予什么权限,需要编写什么类型的代码才能做到这一点 比如:我还是给了下面的权限,只写了下面的代码 权限: mFacebook.authorize(main, new String[] { "publish_stream", "friends_birthday", "friends_photos" }, new

可能重复:

我制作了一个应用程序,其中我正在获取我所有FACEBOOK好友的列表,现在我想在我点击任何好友行时,我将能够在他/她的墙上发布

那么我需要授予什么权限,需要编写什么类型的代码才能做到这一点

比如:我还是给了下面的权限,只写了下面的代码

权限:

         mFacebook.authorize(main, new String[] { "publish_stream",
        "friends_birthday", "friends_photos"  }, new MyAuthorizeListener());
代码:

  @Override

   protected void onListItemClick(ListView l, View v, int position, long id) {
    super.onListItemClick(l, v, position, id);

    MyFriend friend = (MyFriend) this.getListAdapter().getItem(position);

}
我正在取FbId、姓名、日期和照片


现在在病房里你不能贴到我们朋友的墙上

因为Facebook已经从其
图形Api
中删除了该功能,所以我们
无法在朋友的墙上发布


这就是为什么我们只能在facebook墙上发帖的原因。

在好友墙上发帖的功能已从facebook sdk中删除

在此之前,它可能是由以下代码完成的


你有官方声明不支持graph api的“朋友墙上的帖子”吗?@SomnathMuluk没有兄弟,但所有其他代码都不起作用……这是官方声明
 public class MyFriend {
private String fbID = " ";
private String name = " ";
private String bday = " "; 
private String pic = " ";

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