开发者

How to update a user's Facebook status?

开发者 https://www.devze.com 2022-12-18 14:58 出处:网络
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 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:

  1. Create an application, paying particular attention to the Connect settings
  2. Integrate your site with Facebook Connect
  3. Check the user has granted the application the status_update extended permission, and if not pop up the permission dialogue
  4. 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.

0

精彩评论

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

关注公众号