{
"error": {
"message": "(#15) This method must be called with an app access_token.",
"type": "OAuthException",
"code": 15,
"fbtrace_id": "AaKKgfwJzZsNDXADht1N7wy"
}
}
https://graph.facebook.com/v19.0/{app-id}/accounts?access_token={long-lived-user-access-token}
https://graph.facebook.com/v19.0/oauth/access_token?grant_type=fb_exchange_token&client_id={app-id}&client_secret={app-secret}&fb_exchange_token={short-lived-user-access-token}
- 这是 API 调用接收长期页面访问令牌的端点:
https://graph.facebook.com/v19.0/{app-id}/accounts?access_token={long-lived-user-access-token}
不,不是。帐户属于用户对象,而不是应用程序。
{app-id}
实际上需要是应用程序范围的 user id - 或者只是 me
,因为无论如何用户令牌都用于请求。
(错误消息表明它需要应用程序访问令牌,这仅仅是因为您首先定位了错误的端点。)