From 880acad342b69720fe7acd54e0e7cede7036e4c7 Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Mon, 3 Apr 2017 15:17:54 +0100 Subject: 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 --- cpanfile | 2 +- cpanfile.snapshot | 6 +++--- t/Mock/Facebook.pm | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpanfile b/cpanfile index 2907f7633..569136f84 100644 --- a/cpanfile +++ b/cpanfile @@ -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=) { -- cgit v1.2.3