Facebook の認証にサーバー側のスクリプトを使用しています。Chrome と Mozilla では完璧に動作しますが、Opera と IE ではエラーが発生しました。
以下の私の手順: 1. ポップアップ www.facebook.com/dialog/oauth?&client_id={client_id}&redirect_uri={redirect_uri?} で開きます。
if (isset($_GET['code'])) { $curl = curl_init(' https://graph.facebook.com/oauth/access_token?client_id= {client_id}&redirect_uri={redirect_uri}&code='.$_GET ['コード']); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_FRESH_CONNECT, TRUE); $s = curl_exec($curl); curl_close($curl); $access_token = 爆発('=', $s); $tempacc = expand('&', $access_token[1]); $access_token = $tempacc[0];
if($access_token[1] != ''){ $curl = curl_init('https://graph.facebook.com/debug_token?&input_token='.$access_token.'&access_token='.$access_token); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_FRESH_CONNECT, TRUE); $s = curl_exec($curl); curl_close($curl); $user = json_decode($s, true); print_r($user); //get error - Array ( [error] => Array ( [message] => (#100) You must provide an app access token or a user access token that is an owner or developer of the app [type] => OAuthException [code] => 100 ) )
}
Chrome と Mozilla で完璧な同じ作業
また、ここのdevelopers.facebook.com/tools/debug/access_token?q={my_token}のエクスプローラーで要求されたaccess_tokenを確認しましたが、動作します
何か案は?