Facebook post on Friends wall in Android

前端 未结 2 513
暗喜
暗喜 2020-12-03 16:37

I would like to post a picture to my friend\'s wall.

But I logged in to my account say test@gmail.com, but now I want to post on to any of my friend wall.

I

2条回答
  •  旧巷少年郎
    2020-12-03 17:02

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

提交回复
热议问题