Skip to content

Commit

Permalink
Merge pull request #412 from j05u3/patch-1
Browse files Browse the repository at this point in the history
Now facebook requires access_token to get coverInfoURL
  • Loading branch information
StorytellerCZ committed Mar 9, 2015
2 parents 536ca9b + 71aa559 commit 8048ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hybridauth/Hybrid/Providers/Facebook.php
Expand Up @@ -178,7 +178,7 @@ function getUserProfile()
$this->user->profile->firstName = (array_key_exists('first_name',$data))?$data['first_name']:"";
$this->user->profile->lastName = (array_key_exists('last_name',$data))?$data['last_name']:"";
$this->user->profile->photoURL = "https://graph.facebook.com/" . $this->user->profile->identifier . "/picture?width=150&height=150";
$this->user->profile->coverInfoURL = "https://graph.facebook.com/" . $this->user->profile->identifier . "?fields=cover";
$this->user->profile->coverInfoURL = "https://graph.facebook.com/" . $this->user->profile->identifier . "?fields=cover&access_token=".$this->api->getAccessToken();
$this->user->profile->profileURL = (array_key_exists('link',$data))?$data['link']:"";
$this->user->profile->webSiteURL = (array_key_exists('website',$data))?$data['website']:"";
$this->user->profile->gender = (array_key_exists('gender',$data))?$data['gender']:"";
Expand Down

0 comments on commit 8048ddf

Please sign in to comment.