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 --- t/Mock/Facebook.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't/Mock/Facebook.pm') 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