How would offline_access work after deprecation after May 1st?

后端 未结 1 850
滥情空心
滥情空心 2021-01-14 19:25

I did some test, the result I found contradicts Facebook\'s documentation. https://developers.facebook.com/roadmap/offline-access-removal/

If we enable the \"Deprec

相关标签:
1条回答
  • 2021-01-14 20:05

    The section marked 'If you were NOT previously asking for offline_access' in that document explains how to exchange that 2 hour token for a 60 day token: (note that the 2 hours and 60 days values could change in future)

    https://developers.facebook.com/roadmap/offline-access-removal/#extend_token

    Just access

    https://graph.facebook.com/oauth/access_token?             
            client_id=APP_ID&
            client_secret=APP_SECRET&
            grant_type=fb_exchange_token&
            fb_exchange_token=EXISTING_ACCESS_TOKEN 
    

    And the token returned will have a longer expiry (it may be the same token with a longer expiry or a new token, you should handle both cases)

    0 讨论(0)
提交回复
热议问题