2

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 am having all my friends id and Name.

Is it possible to Post a picture in friends wall by logged to my account? If so how is it possible?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Venky
  • 11,049
  • 5
  • 49
  • 66
  • I m not sure but i think facebook SDK has no methods to post on friend's wall.. What u can do is, post on ur own wall which automatically appears on News Feeds or Home page, ultimately ur frnd would be able to see it. – Ankit Mar 14 '11 at 06:11

2 Answers2

4
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){}
Venky
  • 11,049
  • 5
  • 49
  • 66
1

The Facebook SDK in general, as well as the one for Android, allows you to do so. See the example code here.

Community
  • 1
  • 1
Guy
  • 12,250
  • 6
  • 53
  • 70