aboutsummaryrefslogtreecommitdiffstats
path: root/t/Mock
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-04-03 15:17:54 +0100
committerDave Arter <davea@mysociety.org>2017-04-03 16:18:07 +0100
commit880acad342b69720fe7acd54e0e7cede7036e4c7 (patch)
tree07b662f36e862150ad451fe4e976167c2c361406 /t/Mock
parent9e96356d4f0fd42c4434c6ee9f9a47f90fb282fd (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
Diffstat (limited to 't/Mock')
-rw-r--r--t/Mock/Facebook.pm6
1 files changed, 3 insertions, 3 deletions
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=) {