{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/210","labels_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/210/comments","events_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/210/events","html_url":"https://github.com/thephpleague/oauth2-client/pull/210","id":55518263,"number":210,"title":"Upgrade Facebook provider to Graph v2.2","user":{"login":"SammyK","id":578780,"avatar_url":"https://avatars.githubusercontent.com/u/578780?v=3","gravatar_id":"","url":"https://api.github.com/users/SammyK","html_url":"https://github.com/SammyK","followers_url":"https://api.github.com/users/SammyK/followers","following_url":"https://api.github.com/users/SammyK/following{/other_user}","gists_url":"https://api.github.com/users/SammyK/gists{/gist_id}","starred_url":"https://api.github.com/users/SammyK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SammyK/subscriptions","organizations_url":"https://api.github.com/users/SammyK/orgs","repos_url":"https://api.github.com/users/SammyK/repos","events_url":"https://api.github.com/users/SammyK/events{/privacy}","received_events_url":"https://api.github.com/users/SammyK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-01-26T18:24:45Z","updated_at":"2015-02-03T21:19:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/210","html_url":"https://github.com/thephpleague/oauth2-client/pull/210","diff_url":"https://github.com/thephpleague/oauth2-client/pull/210.diff","patch_url":"https://github.com/thephpleague/oauth2-client/pull/210.patch"},"body":"Hey guys! Did some upgrades to the `Facebook` provider.\r\n\r\n# Summary\r\n\r\n- Added a `graphApiVersion` option to the `Facebook` provider to specify which version of the Graph API to use. (Addresses #202)\r\n- Added a fallback Graph API version and set it to the [latest version `v2.2`](https://developers.facebook.com/docs/apps/versions).\r\n- Updated the `scopes`:\r\n\t- Removed `offline_access` since [that has been removed](https://developers.facebook.com/docs/roadmap/completed-changes/offline-access-removal).\r\n\t- Removed the unnecessary [`read_stream` permission](https://developers.facebook.com/docs/facebook-login/permissions/v2.2#reference-read_stream).\r\n\t- Added the new [`public_profile` basic permission](https://developers.facebook.com/docs/facebook-login/permissions/v2.2#reference-public_profile).\r\n- Updated the `urlUserDetails()` method:\r\n\t- Made use of [nested requests](https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#fieldexpansion) to grab the user's profile pic and removed the extra request to the `/me/picture` endpoint in the `userDetails()` method.\r\n\t- Removed the `username` (`nickname`) field since that field has been deprecated and [is no longer available since `v2.0`](https://developers.facebook.com/docs/apps/changelog#v2_0_graph_api).\r\n\t- Added the `gender` & `locale` fields.\r\n\r\n# Specifying the Graph version\r\n\r\n```php\r\n$this->provider = new \\League\\OAuth2\\Client\\Provider\\Facebook([\r\n            /* . . . */\r\n            'graphApiVersion' => 'v2.0',\r\n        ]);\r\n```\r\n\r\nLet me know if I need to add documentation anywhere for the new `graphApiVersion` option. :)"},"comment":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/comments/72737028","html_url":"https://github.com/thephpleague/oauth2-client/pull/210#issuecomment-72737028","issue_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/210","id":72737028,"user":{"login":"philsturgeon","id":67381,"avatar_url":"https://avatars.githubusercontent.com/u/67381?v=3","gravatar_id":"","url":"https://api.github.com/users/philsturgeon","html_url":"https://github.com/philsturgeon","followers_url":"https://api.github.com/users/philsturgeon/followers","following_url":"https://api.github.com/users/philsturgeon/following{/other_user}","gists_url":"https://api.github.com/users/philsturgeon/gists{/gist_id}","starred_url":"https://api.github.com/users/philsturgeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philsturgeon/subscriptions","organizations_url":"https://api.github.com/users/philsturgeon/orgs","repos_url":"https://api.github.com/users/philsturgeon/repos","events_url":"https://api.github.com/users/philsturgeon/events{/privacy}","received_events_url":"https://api.github.com/users/philsturgeon/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T21:19:38Z","updated_at":"2015-02-03T21:19:38Z","body":"The repo is here:\r\n\r\nhttps://github.com/thephpleague/oauth2-facebook/\r\n\r\nIf you could make that up solo and keep an eye on the 1.0 branch that would be sweeeeet.\r\n\r\n-- \r\nPhil\r\n\r\nFrom: Sammy Kaye Powers <notifications@github.com>\r\nReply: thephpleague/oauth2-client <reply@reply.github.com>>\r\nDate: February 3, 2015 at 4:13:06 PM\r\nTo: thephpleague/oauth2-client <oauth2-client@noreply.github.com>>\r\nCc: Phil Sturgeon <me@philsturgeon.uk>>\r\nSubject:  Re: [oauth2-client] Upgrade Facebook provider to Graph v2.2 (#210)  \r\n\r\nShould I just build the repo on my account and move it over or do you want to build it and give me push access?\r\n\r\n—\r\nReply to this email directly or view it on GitHub."}}