Using the Facebook PHP SDK, what steps do I need to take to allow a user to post to their Facebook wall from another website?
开发者_开发百科For example:
- User logs in to external website
- User creates a post
- User clicks 'Push to Facebook' before submitting
- Summarized post appears on Facebook wall (Soandso just posted to mysite.com/entry/page! something like that)
As far as I know, you have two options available:
- Use the feed dialog. This option doesn't let you automatically publish to Facebook (requires user intervention) but it does let you populate the feed story and doesn't require an install. (The feed dialog isn't really related to the PHP SDK, but it's still an option.)
- Use a POST to the user's
/feed
. (Scroll down to publishing.) This method will require an install and additional permissions, but should let you post without user intervention and should still let you alter the content however you want. You can even ask foroffline_access
and post it later if you want. This will also let you populate themessage
parameter, or the status of the post, something which Facebook recently deprecated in the dialogs.
精彩评论