我开发了一个 Andriod 应用程序,在我将电话号码发送到 Facebook 帐户工具包之后,我使用 Facebook 帐户工具包验证电话号码,然后 Facebook 向客户端发送访问令牌,然后我将客户端访问令牌发送到我的网络服务器和从 web 服务器到 account kit 如下:
$access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxx';
$app_secret = 'yyyyyyyyyyyyyyyyyyyyyyy';
$appsecret_proof = hash_hmac('sha256', $access_token, $app_secret);
$url = 'https://graph.facebook.com/v2.1/me?access_token='.$access_token.'&appsecret_proof='.$appsecret_proof;
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$url);
$result=curl_exec($ch);
curl_close($ch);
$final = json_decode($result);
echo"<pre>";print_r($final);
但它给出了如下所示的错误:
stdClass Object
(
[error]=> stdClass Object
(
[message]=>Malformed access token
[type]=>OAuthException
[code]=>190
[fbtrace_id]=>FQftlVOKYL+
)
)
任何解决方案,请!