What facebook API do I use to remotely publish thi

2019-08-25 20:05发布

I have a FB App that a user will subscribe to via some client (Android or Web), but that later needs to post stuff to their wall (not from the client but from the server). Assuming I have the FB-AppID, and Key and the user's UserId, and they have opted into the app, what is the API I would use to then post stuff to their wall via WGET from my server? I'm confused by all their various methodologies, and am hoping to get pointed towards the one that's the most HTTP friendly.

2条回答
够拽才男人
2楼-- · 2019-08-25 20:26

You can use Facebook Graph API. This api is HTTP based and support REST services.

Here is the link -> https://developers.facebook.com/docs/reference/api/ You must be login in Facebook to access this page.

查看更多
狗以群分
3楼-- · 2019-08-25 20:32

Please check out the "posts/Create" section under https://developers.facebook.com/docs/reference/api/user/.

You will need publish_stream permission to push the same to facebook.

Also, you will need a valid access_token from FB which is linked to the user who has logged into your app. A standard access_token will work only for a fixed amount of time since it was last provided to you (typically 30 minutes).

If you wish to post after the said time (basically anytime), then you will need the offline_access permission also.

In essence, if you need to do a post offline, then you need to necessarily have an access token with both "offline_access" and "publish_stream" permissions.

查看更多
登录 后发表回答