Facebook Graph API。如何从后
问题描述:
嗨评论我有这个从后它的工作原理得到的评论是有一个年Facebook Graph API。如何从后
$json = file_get_contents("http://graph.facebook.com/730350233684840/comments?limit=2500");
echo $json;
,但现在我在Facebook上分享这个错误
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104
}
}
我怎么能得到所有来自帖子的评论?
我一直在使用你的代码@luschn 我与真正的APP ID和App秘密
https://graph.facebook.com/730350233684840/comments?limit=2500&access_token=[APPIS|APPSECRT]
要求我有这个
{
"error": {
"message": "Invalid OAuth access token signature.",
"type": "OAuthException",
"code": 190
}
}
我使用Chrome看看这个错误
- - 英语不是我的母语,对于任何错误感到抱歉。
答
你必须改变位置访问令牌,并限制
https://graph.facebook.com/167416583311544_730350233684840/comments?access_token=appId|appSecret&limit=2500
答
例如:
$json = file_get_contents("http://graph.facebook.com/730350233684840/comments?limit=2500&access_token=[your-access-token]");
最基本的访问令牌是一个应用程序访问令牌,你可以创建一个这样的:
$appAccesstoken = $appId . '|' . $appSecret;
根据不同的资源,你可能需要一个用户或但是页面令牌。为此,您必须授权用户,并且它变得更加复杂。关于访问令牌
的更多信息:
好,做什么它说错误消息。使用访问令牌。 – luschn
我怎么可以使用它:■ – Ruydo