Skip to content Skip to sidebar Skip to footer

Post On User's Friends Facebook Wall Through Android Application

I am developing an Android application in which the user logs in using its facebook id. I can get all the information about the user and i even get its friends list with following

Solution 1:

Check out:

How to post on facebook wall using Facebook android SDK, without opening dialog box

and

How to post message on facebook wall using Facebook android SDK integrate android app

Here's a small example that will post to a friend's wall (or if userId is null then to the currently logged in user's wall):

protectedvoidpostToWall(String userId)
{
    Bundle params = new Bundle();
    params.putString("message", _messageInput.getText().toString());
    params.putString("caption", "{*actor*} just posted a secret message.");
    params.putString("description", "A secret message is waiting for you.  Click the link to decode it.");
    params.putString("name", "A Secret Message For You");
    params.putString("picture", "http://www.kxminteractive.com/Content/images/app_logos/secretMessage.png");
    params.putString("link", "http://www.kxminteractive.com/decrypt/" + _lookupKey);        

    asyncRunner.request(((userId == null) ? "me" : userId) + "/feed", params, "POST", new WallPostRequestListener());       
}

Solution 2:

use this to send message on friends wall of id(uid):

Bundle params = new Bundle();                           
params.putString("message", "hello ...");
Utility.mAsyncRunner.request(uid+"/feed", params, "POST", new FriendRequestListener(), null);

Post a Comment for "Post On User's Friends Facebook Wall Through Android Application"