简体   繁体   中英

Can my website post to Facebook?

I have a PHP based website which has a post/comment system. Can I add a checkbox to my post function so that if it is checked the post will be published to Facebook as well as my own website at the same time?

I have looked through the docs on facebook and I saw a comment plugin, but it's not really what I am looking for.

I would appreciate a tutorial, links, code, or just general help.

If you're looking for a way to replicate the auto-posting functionality in the fb:comments plugin, the only way to accomplish that is asking the users to install an app. By using the sandboxed fb:comments social plugin, Facebook controls the user experience, so users can post to their wall without an install. If you use your own method though, you'll need to require an install (and publish_stream permissions) .

I'd recommend using fb:comments if at all possible, since that creates less friction for your users and will be a more familiar experience for them. If you wish to do something with the comment as it's added, you can subscribe to the comment.create event.

May be you can use the Feed Dialog have a look: http://bit.ly/rQWC36 You can launch the dialog if the checkbox is checked, after submit the comments form. Or may be you can use the OpenGraph API versión of the feed dialog, look for the section: " Graph API Equivalent " documentation doesn't sais nothing about permission on using that dialog this way. I hope it helps.

I am still unsure of what you are looking for but still facebook api is a good place to start off. A part from that, the checkboxes and automatically going to facebook that you have referred will be done according to your language/framework which you have not illustrated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM