1
私は共有ホスティングサーバで以下のコードを使用していますが、うまくいきましたが、今は専用のサーバに移動しましたが、このスクリプトは機能しません。Facebook Graph APIが新しいサーバで動作しない
専用サーバーには、CentOS 6.8、Apache 2.2、PHP 7.0.14、MySQL 5.6があり、カールがインストールされています。
私も恒久的なアクセストークンを使用しています。
$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"];
コンソールにエラーが見つかりません。これをデバッグする方法はありますか?