开发者

programmatically set comment with attachment in fb connect for iphone

开发者 https://www.devze.com 2022-12-13 01:24 出处:网络
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 a

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

0

精彩评论

暂无评论...
验证码 换一张
取 消