philsturgeon/codeigniter-oauth2 — Issue #7: Providers get_user_info() Token Reference
Author: fisherinnovation
Created: 2012-02-17 19:13:22+00:00
State: open

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.