Using FB Connect for iPhone. I'd like the user to be able to post a link with thumbnail to their profile. This is done using the "attachment" property on FBStreamDialog. In addition, I'd like to be able to provide a custom interface for the user to enter in a comment with the attachment. (The comme开发者_运维技巧nt would be the message that's associated with the "userMessagePrompt" property).
However, the only way I can see to do this currently is for the user to enter in their message in the FBStreamDialog popup. Is there any way to programmatically set the comment in iOS?
I ended up solving this on the server side, as follows:
From my iPhone application, I make a POST request to a PHP script that includes the link to be posted, in addition to the user-supplied message.
The PHP script then uses the Stream.publish API to post the link to the user's profile:
http://wiki.developers.facebook.com/index.php/Stream.publish
精彩评论