Php FB Graph API未响应公共服务器

Php FB Graph API未响应公共服务器,php,json,facebook,facebook-graph-api,server,Php,Json,Facebook,Facebook Graph Api,Server,我正在尝试使用appid访问我的页面,在php中使用file_get_contents()访问令牌。 链接是:https://graph.facebook.com/?access_token=|&字段=喜欢 我的FB应用程序处于开发模式,但它在本地主机上提供输出,我正在通过MAMP运行该主机 问题 我的网站由使用PHP5.4的BYETHOST托管,allow\u url\u fopen处于打开状态 代码 <?php $json_url ='https://graph.facebook.co

我正在尝试使用appid访问我的页面,在php中使用file_get_contents()访问令牌。 链接是:
https://graph.facebook.com/?access_token=|&字段=喜欢

我的FB应用程序处于开发模式,但它在本地主机上提供输出,我正在通过MAMP运行该主机

问题

我的网站由使用PHP5.4的BYETHOST托管,
allow\u url\u fopen
处于打开状态

代码

<?php
$json_url ='https://graph.facebook.com/<page_name>?access_token=<access_token>|<appid>&fields=likes';
$json = file_get_contents($json_url);
$json_output = json_decode($json);
//Extract the likes count from the JSON object
if($json_output->likes){
    $likes = $json_output->likes;
    echo $likes;
}else{
    echo 'FB Request Error!';
}
?>

但是,如果我将链接更改为
https://qrng.anu.edu.au/API/jsonI.php?length=1&type=uint8
它在localhost和BYETHOST上都能完美地提供输出


这里可能有什么问题?

您所说的“不工作”是什么意思?FB graph API没有任何输出。输出为“FB请求错误”@chris“不工作”是什么意思?FB graph API没有任何输出。输出为“FB请求错误”@克里斯