Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Facebook Action Links

I guess there's no way to add Action Links to a facebook post on iphone?

— asked April 14th 2010 by James Low
  • facebook

3 Answers

  • I just used publish_stream in my app and got it working. I have not tested Action Links yet but plan on doing so.

    As you can see from the link below, the "Action Link" belongs in the data argument.


    For help with setting up a string that fits with the data rules, here is a better explanation from facebook:


    All in all, try adding this code and let me know if it works!

    //setup alert
    var a = Titanium.UI.createAlertDialog({title:'Facebook'});
    a.addEventListener('click', function()
    //code to publish stream
    //here is your attachment
    var attachment = {'media': [{'type':'image',
    //this is a message that pops shows above the text box, it doesn't have any effect on the published stream as far as i can tell
    var msg =  "Write your message in the box below";
    //leave this variable null if you want to post to your own wall, else this is the persons wall you are posting to
    var fbid = 1111;  
        Titanium.API.info("received publish stream response = "+JSON.stringify(r));
        if (r.success)
            a.setMessage('Your stream was published!').show();
            a.setMessage('Sorry, we encountered an error.').show();
    — answered April 14th 2010 by Ryan Gartin
    • Is this still working? I had no luck. Did FB change st in the meantime ,,,?

      — commented December 22nd 2010 by Ralf Klotzbuecher
    • Is it necessary to make human intervention for type something? How can I post link to my facebook wall by just clicking a button?

      — commented February 1st 2011 by Manaday Mavani
  • Yea I've got the publish stream working, but from the facebook connect for iPhone documentation in seems you can't use action links.

    — answered April 14th 2010 by James Low
  • Action links don't work not supported by Facebook for the iPhone client unless you use an HTML share link.

    — answered April 28th 2010 by James Low
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.