[英]Is refreshing long lived access token endpoint working in 2021?
Trying to refresh my long lived access token via this endpoint:尝试通过此端点刷新我的长期访问令牌:
https://developers.facebook.com/docs/instagram-basic-display-api/guides/long-lived-access-tokens#refresh-a-long-lived-token https://developers.facebook.com/docs/instagram-basic-display-api/guides/long-lived-access-tokens#refresh-a-long-lived-token
Keep getting the error: OAuth "Facebook Platform" "invalid_token" "Invalid OAuth access token."
不断收到错误:
OAuth "Facebook Platform" "invalid_token" "Invalid OAuth access token."
However, I debug my token using https://developers.facebook.com/tools/debug/accesstoken/ which shows that it is valid and for around 2 months (which proves its a long lived access token).但是,我使用https://developers.facebook.com/tools/debug/accesstoken/调试我的令牌,这表明它是有效的并且大约 2 个月(这证明它是一个长寿的访问令牌)。
Does this endpoint not work anymore or am I missing something?这个端点不再工作还是我错过了什么?
PS I'm using a User Access Token, its a public Instagram business account backed by a Facebook page. PS 我使用的是用户访问令牌,它是一个由 Facebook 页面支持的公共 Instagram 商业帐户。 Also, I'm using this on server, so it won't refresh if the token is used within 60 days (that's what happens when you auth through FB mobile sdk).
另外,我在服务器上使用它,因此如果令牌在 60 天内使用,它不会刷新(这就是您通过 FB 移动 sdk 进行身份验证时发生的情况)。
EDIT编辑
So it looks like there are two requirements that I missed:所以看起来我错过了两个要求:
HOWEVER然而
I tried:我试过了:
So what does this mean, Facebook isn't allowing refresh of long lived tokens?那么这意味着什么,Facebook 不允许刷新长寿命令牌?
NOTE : The docs on how to refresh a long lived access token are for the Basic Display API, which isn't recommended for business accounts (which is who will be using my app).注意:有关如何刷新长期访问令牌的文档适用于基本显示 API,不建议将其用于企业帐户(谁将使用我的应用程序)。 So this makes me more unsure of if it is possible to refresh tokens for the Instagram Graph API.
所以这让我更加不确定是否可以刷新 Instagram Graph API 的令牌。
MORE INFO更多信息
So on the FB developer portal, if you add the Instagram Basic Display product to your app (I previously didn't have it) it allows you to ask for the instagram_graph_user_profile
permission.因此,在 FB 开发者门户上,如果您将 Instagram Basic Display 产品添加到您的应用程序(我以前没有),它允许您请求
instagram_graph_user_profile
权限。 However, this brings up more questions:然而,这带来了更多的问题:
instagram_graph_user_profile
permission?instagram_graph_user_profile
权限? It still causes FB login to fail. So I ended up contacting a few companies that I know for a fact do what I was trying to do and they confirmed that Facebook does REQUIRE the user to re-authorize after ~60 days.所以我最终联系了几家我知道的公司做我想做的事情,他们确认 Facebook 确实要求用户在大约 60 天后重新授权。
If they don't, the long lived access token will expire.如果他们不这样做,长期访问令牌将过期。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.