Facebook API:如何更新状态?

And*_*dre 5 facebook

如何通过 API 更新我的 Facebook tatus 消息?

网上有很多示例,但所有这些示例似乎都已被新 Facebook API 弃用。

问候!

Nat*_*ten 2

状态消息现在只是一个帖子。因此,您使用 Graph API 向用户发布帖子。您基本上只需要对http://graph.facebook.com/PROFILE_ID/feed执行 HTTP POST 即可。POST 正文应包含消息的值。如果您希望更改状态,则只需设置消息即可。以下是使用curl 的方法。

curl -F 'access_token=...' \
 -F 'message=Check out this funny article' \
 https://graph.facebook.com/me/feed
Run Code Online (Sandbox Code Playgroud)

您可以在这里找到更多相关信息:http://developers.facebook.com/docs/reference/api/post