它看起来像Facebook发送时的验证位code
,state
参数通过$ _GET不包含在PHP-SDK中。
if(!empty($_GET['code']) && !empty($_GET['state']))
{
$response = file_get_contents('https://graph.facebook.com/oauth/access_token?' . http_build_query(array('client_id' => AY_FACEBOOK_APP_ID, 'client_secret' => AY_FACEBOOK_APP_SECRET, 'redirect_uri' => AY_FACEBOOK_TAB_URL, 'code' => $_GET['code'])));
// now check state and parse access token
ay($response);
}
我忽略了什么吗?如果不是,那么不包括它的原因是什么?
请注意,我没有要求提供一个DMCS和Luc Franken迄今为止的例子。
请再次阅读问题。 – Gajus 2012-01-30 18:43:49