Facebook Action Links
I guess there's no way to add Action Links to a facebook post on iphone?
http://wiki.developers.facebook.com/index.php/Facebook_Connect_for_iPhone#Publishing_Feed_Stories_to_the_Stream
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.
https://developer.appcelerator.com/apidoc/mobile/1.2/Titanium.Facebook.publishStream.html
For help with setting up a string that fits with the
data
rules, here is a better explanation from facebook:http://developers.facebook.com/docs/?u=facebook.jslib.FB.Connect.streamPublish
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() { win.close(); }); //code to publish stream //here is your attachment var attachment = {'media': [{'type':'image', 'src':'http://bit.ly/AJTnf', 'href':'http://bit.ly/hifZk'}]}; //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.Facebook.publishStream(msg,attachment,fbid,function(r) { Titanium.API.info("received publish stream response = "+JSON.stringify(r)); if (r.success) { a.setMessage('Your stream was published!').show(); } else { a.setMessage('Sorry, we encountered an error.').show(); } });
-
Yea I've got the publish stream working, but from the facebook connect for iPhone documentation in seems you can't use action links.
-
Action links don't work not supported by Facebook for the iPhone client unless you use an HTML share link.