How to update a user's Facebook status?
I looked at many similar questions here at Stackoverflow.com and searched in Google but still could not find an answer, so I am posting this new question.
I have a 3rd party PHP5 website in which users can write a short message. I want to have the ability for the user to click a button to share that message as a facebook status. It is in my understanding that this can be done using the Facebook API and Users.setStatus. I am no开发者_如何学运维t sure where to begin though - do I implement Facebook connect in my site? I don't need anything but that ability, so I don't need a facebook 'canvas' page. Do I start an application? Could someone point me in the right direction?
Thanks!
You need to:
- Create an application, paying particular attention to the Connect settings
- Integrate your site with Facebook Connect
- Check the user has granted the
application the
status_update
extended permission, and if not pop up the permission dialogue - Use the
Status.set
API call
The details for each step are far too big for one SO answer, but hopefully that's a "point in the right direction".
You'll need to create a facebook application in order to set someone's status with Users.setStatus
. You should keep in mind that users will have to install your application and allow it to publish on their behalf before you can do so, though.
Check out developer.facebook.com to get started.
精彩评论