简体   繁体   English

通过Android应用程序在Facebook朋友的墙上发布消息

[英]Post a message on facebook friend's wall in through Android applcation

I want to post message on Facebook friend's wall through application. 我想通过应用程序在Facebook朋友的墙上发布消息。 I am getting Facebook friend-list and some information like id, birthday, name, email,image,sex. 我正在获取Facebook朋友列表以及一些信息,例如ID,生日,姓名,电子邮件,图像,性别。

I am pasting here some code which is used 我在这里粘贴一些使用的代码

Bundle parameters = new Bundle();
JSONObject attachment = new JSONObject();
   try {
        attachment.put("message", "Many more returns of the day");
       } catch (JSONException e) {
        }
   parameters.putString("attachment", attachment.toString());
   parameters.putString("target_id", iddd); // target Id in which you need to Post 
   parameters.putString("method", "stream.publish");
   String  response = authenticatedFacebook.request(parameters);       
   Log.v("response", response);

After run it I am getting this errors: 运行后,我得到此错误:

"V/response(1420): {"error_code":101,"error_msg":"Invalid application ID.","request_args":[{"key":"method","value":"stream.publish"},{"key":"format","value":"json"},{"key":"target_id","value":"100000739061115"},{"key":"attachment","value":"{\\"message\\":\\"Many more returns of the day\\"}"}]}" “ V / response(1420):{” error_code“:101,” error_msg“:”无效的应用程序ID。“,” request_args“:[{” key“:”方法“,” value“:” stream.publish“} ,{“ key”:“ format”,“ value”:“ json”},{“ key”:“ target_id”,“ value”:“ 100000739061115”},{“ key”:“ attachment”,“ value”: “ {\\” message \\“:\\”一天中有很多返回\\“}”}]}“

My question is: 我的问题是:

  1. Is is possible to post any message through application in Facebook friend's wall ? 可以通过应用程序在Facebook朋友的墙上发布任何消息吗? if yes please provide some method. 如果是,请提供一些方法。

Thanks in advance Please Help 预先感谢,请帮助

After reading a few questions like this one on the internet, it seems that Facebook does not allow any longer to publish on a friend's wall via their SDK since February 2013. 在互联网上阅读了类似的问题后,自2013年2月起,Facebook似乎不再允许通过其SDK在朋友的墙上发布。
Sources: 资料来源:
Source 1 来源1
Source 2 来源2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM