0

I have read alot about publish_stream and offline_access.

1.) User connects on my website. 2.) I can now post on he's wall with the API on the user (userid saved in database)

But what if user sign out of Facebook and come back on my website? Then the user has to "accept"/"login" again, but it has to be logged in automatcitly, so i in the future can post to the facebook wall of the user.

Do i have to save access_token, user_id in database, what else? I cannot figure this out.

4

2 回答 2

1

您必须存储访问令牌和用户 ID。访问令牌的有效期为 1 到 2 小时,但可以与有效期为 30 天的长寿命令牌交换。不推荐使用 offline_access 权限,并将在 12 月 5 日之前将其删除。

如何扩展访问令牌:https ://developers.facebook.com/roadmap/offline-access-removal/

于 2012-10-23T09:43:09.737 回答
0

您只需要存储在数据库中的 user_id 和 access_token,然后您可以随时使用它来发布。但请记住,令牌会在一段时间后过期。

解决方案

于 2012-10-23T00:15:06.313 回答