Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To Post on friend's wall using feed dialog in sdk 3.5

I am trying to post on the wall or send a private message to a friend.. I am using the latest SDK 3.5. I read that we should use the feed dialog to perform it.

my Code

private void publishFeedDialog() {
    try{
        Bundle params = new Bundle();
        params.putString("name", "Facebook SDK for Android");//title 
        params.putString("caption", "Build great social apps and get more installs.");//caption 
        params.putString("description", "The Facebook SDK for Android makes it easier and faster to develop Facebook integrated Android apps.");

        WebDialog feedDialog = (
                new WebDialog.FeedDialogBuilder(InviteParticipantsActivity.this,
                    Session.getActiveSession(),
                    params))
                .setOnCompleteListener(null)
                .build();
            feedDialog.show();
}
catch(Exception e){
    e.printStackTrace();
}
}

This code will post it on my wall but I am looking to post it on a friends wall or send a message.

I have all the details such as the name and id of the target user.

like image 208
Srikanth Pai Avatar asked Dec 10 '25 05:12

Srikanth Pai


1 Answers

params.putString("to", "TARGET Facebook USER ID");

To post on your friends wall Add the parameter "to"

like image 131
Srikanth Pai Avatar answered Dec 12 '25 17:12

Srikanth Pai