问题描述
:
这些流所采用的访问令牌有什么区别?
看起来他们的长度不一样。
What is the difference between access tokens taken by these flows?It seems like they length differ.
我们可以在客户端使用服务器端流标记吗?否则,我们可以在服务器上使用客户端流令牌吗?
Can we use server-side flow token on a client? And otherwise, can we use client-side flow token on a server?
推荐答案
目前,Facebook这个关于access_tokens的。在服务器端OAuth上
Currently, Facebook says this about access_tokens. On Server-side OAuth
在客户端OAuth流程中, strong>现有的,不过期的,短期的用户access_token 。为了使这个access_token长寿,Facebook正在提供一个新的端点,与一个具有更长寿命的access_token交换短暂的access_token。终点是
Where as client-side OAuth flow will give you a existing, non-expired, short-lived user access_token. To make this access_token long lived, facebook is providing a new endpoint that exchanges the short lived access_token with an access_token with longer life. The endpoint is
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
另请注意,
摘录自
这篇关于Facebook访问令牌:服务器端与客户端流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!