Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Change for Facebook Platform Upgrade #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/OAuth2/Provider/Facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Facebook extends Provider

public function url_authorize()
{
return 'https://www.facebook.com/dialog/oauth';
return 'https://www.facebook.com/v2.0/dialog/oauth';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this 2.0 and all the others 2.1?

}

public function url_access_token()
Expand All @@ -25,7 +25,7 @@ public function url_access_token()

public function get_user_info(Token_Access $token)
{
$url = 'https://graph.facebook.com/me?'.http_build_query(array(
$url = 'https://graph.facebook.com/v2.1/me?'.http_build_query(array(
'access_token' => $token->access_token,
));

Expand All @@ -43,7 +43,7 @@ public function get_user_info(Token_Access $token)
'gender' => $user->gender,
'timezone' => $user->timezone,
'verified' => $user->verified,
'image' => 'https://graph.facebook.com/me/picture?type=normal&access_token='.$token->access_token,
'image' => 'https://graph.facebook.com/v2.1/me/picture?type=normal&access_token='.$token->access_token,
'urls' => array(
'Facebook' => $user->link,
),
Expand All @@ -52,7 +52,7 @@ public function get_user_info(Token_Access $token)

public function get_user(Token_Access $token)
{
$url = 'https://graph.facebook.com/me?'.http_build_query(array(
$url = 'https://graph.facebook.com/v2.1/me?'.http_build_query(array(
'access_token' => $token->access_token,
));

Expand Down