【发布时间】:2017-01-05 21:58:17
【问题描述】:
所以我一直在我的共享托管服务器上使用以下代码,它一直运行良好,但现在我们已经转移到专用服务器,但这个脚本不起作用?
专用服务器有 CentOS 6.8、Apache 2.2、PHP 7.0.14、MySQL 5.6 并安装了 curl。
我也在使用永久访问令牌。
$data['access_token'] = '{my permanent access token}';
$post_url = 'https://graph.facebook.com/{my feed ID}/feed';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($ch);
curl_close($ch);
$dec = (Array)json_decode($return);
$link = "https://www.facebook.com/".$dec["id"];
我在控制台中找不到任何错误,有什么方法可以调试吗?
【问题讨论】:
标签: php mysql facebook facebook-graph-api curl