Closed fisherinnovation closed 12 years ago
From the main call in the oauth2 class:
$user = $provider->get_user_info($token->access_token);
I have only tested this with Facebook so far but within get_user_info - the initial call with the users access token
$url = 'https://graph.facebook.com/me?'.http_build_query(array( 'access_token' => $token->access_token, ));
Is improperly referencing the token string. Since '$token->access_token' is passed into 'get_user_info' the token is no longer an object but a string.Thus,
$url = 'https://graph.facebook.com/me?'.http_build_query(array( 'access_token' => $token, ));
Allows the token to properly be passed.
Newer versions of this will throw an exception if the parameter is not an object. Pass the whole object, not just the string.
From the main call in the oauth2 class:
$user = $provider->get_user_info($token->access_token);
I have only tested this with Facebook so far but within get_user_info - the initial call with the users access token
$url = 'https://graph.facebook.com/me?'.http_build_query(array( 'access_token' => $token->access_token, ));
Is improperly referencing the token string. Since '$token->access_token' is passed into 'get_user_info' the token is no longer an object but a string.Thus,
$url = 'https://graph.facebook.com/me?'.http_build_query(array( 'access_token' => $token, ));
Allows the token to properly be passed.