我想使用以下链接 fpor 示例使用 graph api
显示个人资料图片:
https://graph.facebook.com/me/picture?redirect=0&height=200&type=normal&width=200
我收到回复:
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500
}
}
在哪里 link他们说
Because profile pictures are always public on Facebook, this call does not require any access token.
最佳答案
URI 中的 me
只是一个占位符,您需要将实际的 Facebook user-id
放入,例如标题 (/{user- id}/picture
) 链接页面的建议。
例如:
https://graph.facebook.com/snoopdogg/picture?redirect=0&height=200&type=normal&width=200
...返回以下内容:
{
"data": {
"url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash3/c11.0.433.433/s200x200/598452_10151897536239807_882122819_n.jpg",
"width": 200,
"height": 200,
"is_silhouette": false
}
}
关于android - 为什么使用 Graph API 获取 FB 头像需要访问 token ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21318607/