fuel-packages/fuel-oauth2 — Issue #13: facebook fields might not be set, leading to undefined properties
Author: zarunor
Created: 2011-12-15 07:37:25+00:00
State: open

In facebook.php, get_user_info() is trying to return the results of graph.facebook.com/me, but depending on the Facebook app permissions, those properties won't be retrieved. Consequently, they won't be set in the $user object:

'location' => $user->hometown->name,
'description' => $user->bio,

Same thing with:

'nickname' => $user->username,

Not all facebook users have usernames set.

This leads to the following errors:

Error - 2011-12-15 04:59:27 --> 8 - Undefined property: stdClass::$username

Error - 2011-12-15 04:59:27 --> 8 - Undefined property: stdClass::$hometown

Error - 2011-12-15 04:59:27 --> 8 - Trying to get property of non-object

Error - 2011-12-15 04:59:27 --> 8 - Undefined property: stdClass::$bio