以下https://developers.facebook.com/docs/facebook-login/guides/access-tokens/get-long-lived/
并使用图形浏览器 https://developers.facebook.com/tools/explorer
Short Lived User Token
/me?fields=id,name
id
是我的App Scoped User Id
/oauth/access_token?grant_type=fb_exchange_token&client_id=xxx&client_secret=yyy&fb_exchange_token={Short Lived User Token}
access_token
是我的Long Lived User Token
/{App Scoped User ID}/accounts?access_token={Long Lived User Token}
但返回的只是
{
data: []
}
我做错了什么?
我需要将范围
business_management
添加到我的(短暂的)用户访问令牌 - 然后再次完成整个过程。
我认为这就是解决问题的方法。
一路上帮助我的是我不知道存在的令牌调试器: https://developers.facebook.com/tools/debug/accesstoken