1

I am a little confused about calculating the time until the access token expires.

I am using server authentication (http://developers.facebook.com/docs/authentication/server-side/).

When I get the authentication code from the Facebook's request to my redirect URL, I send an authentication request back to Facebook and I get the access token along with 'expires' parameters, lately I could see that the expires is a long value that represents the time in seconds until the token expires. For some reason I think it used to be time in miliseconds.

Can I assume that the expiration time is now + expires (in seconds) - it seems to me too long (about ~5109691 seconds) - does it make sense?

Thank you for your help.

4

1 に答える 1

10

サーバー認証アクセス トークンは 2 か月間有効です。あなたが受け取っている値は正しいです。

編集: https://developers.facebook.com/roadmap/offline-access-removal/

「サーバー側 OAuth 開発者」セクションを読んでください。

于 2012-04-16T13:05:54.327 に答える