简体   繁体   中英

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

I want to post message on Facebook friend's wall through application. I am getting Facebook friend-list and some information like id, birthday, name, email,image,sex.

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\\"}"}]}"

My question is:

  1. Is is possible to post any message through application in Facebook friend's wall ? 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.
Sources:
Source 1
Source 2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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