diff options
author | Dave Arter <davea@mysociety.org> | 2017-04-03 15:17:54 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-04-03 16:18:07 +0100 |
commit | 880acad342b69720fe7acd54e0e7cede7036e4c7 (patch) | |
tree | 07b662f36e862150ad451fe4e976167c2c361406 | |
parent | 9e96356d4f0fd42c4434c6ee9f9a47f90fb282fd (diff) |
Upgrade Net::Facebook::Oauth2 to 0.10
0.09 was communicating with v2.2 of the Facebook API which was switched off
on 25th March 2017, so Facebook logins were no longer working.
Mock::Facebook was updated to correctly return JSON from /oauth/access_token,
to match the behaviour expected since v2.3 of the FB API.
Fixes #1681
-rw-r--r-- | cpanfile | 2 | ||||
-rw-r--r-- | cpanfile.snapshot | 6 | ||||
-rw-r--r-- | t/Mock/Facebook.pm | 6 |
3 files changed, 7 insertions, 7 deletions
@@ -74,7 +74,7 @@ requires 'MooX::Types::MooseLike'; requires 'namespace::autoclean'; requires 'Net::DNS::Resolver'; requires 'Net::Domain::TLD', '1.75'; -requires 'Net::Facebook::Oauth2'; +requires 'Net::Facebook::Oauth2', '0.10'; requires 'Net::OAuth'; requires 'Net::Twitter::Lite::WithAPIv1_1'; requires 'Path::Class'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index c842dad99..4c3098bdb 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -4373,11 +4373,11 @@ DISTRIBUTIONS Carp 0 ExtUtils::MakeMaker 0 Storable 0 - Net-Facebook-Oauth2-0.09 - pathname: M/MA/MAMOD/Net-Facebook-Oauth2-0.09.tar.gz + Net-Facebook-Oauth2-0.10 + pathname: M/MA/MAMOD/Net-Facebook-Oauth2-0.10.tar.gz provides: MyApp::Controller::Facebook undef - Net::Facebook::Oauth2 0.09 + Net::Facebook::Oauth2 0.10 requirements: Carp 0 ExtUtils::MakeMaker 0 diff --git a/t/Mock/Facebook.pm b/t/Mock/Facebook.pm index eb882af21..339eae536 100644 --- a/t/Mock/Facebook.pm +++ b/t/Mock/Facebook.pm @@ -20,14 +20,14 @@ has returns_email => ( sub dispatch_request { my $self = shift; - sub (GET + /v2.2/dialog/oauth + ?*) { + sub (GET + /v2.8/dialog/oauth + ?*) { my ($self) = @_; return [ 200, [ 'Content-Type' => 'text/html' ], [ 'FB login page' ] ]; }, - sub (GET + /v2.2/oauth/access_token + ?*) { + sub (GET + /v2.8/oauth/access_token + ?*) { my ($self) = @_; - return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'access_token=access_token&expires=never' ] ]; + return [ 200, [ 'Content-Type' => 'application/json' ], [ '{"access_token": "access_token"}' ] ]; }, sub (GET + /me + ?fields=) { |