Posting on user's friend's wall possible?

You must Login before you can answer or comment on any questions.

Is it possible to post something on a user's friend's wall from with the titanium app?

Thanks in advance for any assistance!

2 Answers

Hi Saquib,

Yes, you can post on friends wall on Facebook. For that you need your friend's Facebook Id

Use below code

var friend_facebook_id = ""; //your friend's Facebook Id 
 
Ti.Facebook.requestWithGraphPath(friend_facebook_id+'/feed', {message: "Trying out FB Graph API and it's fun!"}, 
         "POST", function(e) {
    if (e.success) {
        alert("Success!  From FB: " + e.result);
    } else {
        if (e.error) {
            alert(e.error);
        } else {
            alert("Unkown result");
        }
    }
});
Hope this helps you


http://www.titaniumtutorial.com

— answered 11 months ago by Karthi Ponnusamy
answer permalink
3 Comments
  • Thanks. I will give this a shot. Also, how do I get a user's friend's facebook id?

    — commented 11 months ago by Saqib Khalil

  • use below code to get friend's Facebook id

    Titanium.Facebook.requestWithGraphPath('me/friends', {}, "POST", function(e) {
        if (e.success) {
            //handle the response(response will contain friends full name and facebook id ), using the facebook id try 'friend_id/feed' method
        } else {
            if (e.error) {
                alert(e.error);
            } else {
                alert("Unkown result");
            }
        }
    });

    — commented 11 months ago by Karthi Ponnusamy

  • Appreciate it!

    — commented 11 months ago by Saqib Khalil

Your Answer

Think you can help? Login to answer this question!