Php Facebook图形API文件_get_contents()返回false
我目前正在尝试调用Facebook API来获取Facebook Lead数据,但没有找到任何可以解决我问题的方法。我希望至少能够解析从浏览器得到的JSON响应 以下是我想做的: 以下是简化代码:Php Facebook图形API文件_get_contents()返回false,php,json,facebook-graph-api,file-get-contents,php-5.6,Php,Json,Facebook Graph Api,File Get Contents,Php 5.6,我目前正在尝试调用Facebook API来获取Facebook Lead数据,但没有找到任何可以解决我问题的方法。我希望至少能够解析从浏览器得到的JSON响应 以下是我想做的: 以下是简化代码: <?php echo '<pre>'; try { $str = 'https://graph.facebook.com/v2.5/444444444444?access_token=<token>'; $a = file_get_contents($s
<?php
echo '<pre>';
try {
$str = 'https://graph.facebook.com/v2.5/444444444444?access_token=<token>';
$a = file_get_contents($str);
}catch(Exception $e){
echo 'error: '.$e->getMessage();
}
var_dump($a);
print_r(json_decode($a));
echo '</pre>';
通过Chrome访问它会给我一个JSON响应,错误如下:
这没有帮助:
有什么想法吗?a美元的价值是多少?44444是多少?是表格ID吗?页面ID?帐户ID?@Dimi这是一个Facebook Lead ID
不受支持的获取请求
表示该ID不正确,或者您无权使用您的访问令牌及其包含的权限访问该对象。$a
的值是多少?44444是多少?是表格ID吗?页面ID?帐户ID?@Dimi这是一个Facebook Lead ID不受支持的获取请求
表示该ID不正确,或者您无权使用您的访问令牌及其包含的权限访问该对象。
bool(false)
{
"error": {
"message": "Unsupported get request. Object with ID '444444444444' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "A+7XDwKGBhW"
}
}