forked from GNUsocial/gnu-social
Move check for valid access token to the right place
This commit is contained in:
parent
ec53e68cf2
commit
cd30c94096
@ -44,11 +44,12 @@ class FacebookfinishloginAction extends Action
|
||||
|
||||
if (isset($_COOKIE['fb_access_token'])) {
|
||||
$this->accessToken = $_COOKIE['fb_access_token'];
|
||||
}
|
||||
|
||||
if (empty($this->accessToken)) {
|
||||
$this->clientError(_m("Unable to authenticate you with Facebook."));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$graphUrl = 'https://graph.facebook.com/me?access_token=' . urlencode($this->accessToken);
|
||||
$this->fbuser = json_decode(file_get_contents($graphUrl));
|
||||
|
Loading…
Reference in New Issue
Block a user