facebookarchive / php-graph-sdk

The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login. https://developers.facebook.com/docs/php
Other
3.17k stars 1.96k forks source link

502 Bad Gateway on sendRequest #1132

Open araeuchle opened 5 years ago

araeuchle commented 5 years ago

I am trying to implement a facebook login with PHP and your php-graph-sdk using laravel and laravel valet.

The redirect to facebook and setting permissions works as expected but everytime i am trying to access the callback handler the request throws a 502 Bad Gateway with the message in error log:

*1 upstream prematurely closed connection while reading response header from upstream,

The part were it happens is in this file: vendor/facebook/graph-sdk/src/Facebook/Authentication/OAuth2Client.php

in the sendRequestWithClientParams method.

here it throws the Bad Gateway on this call

  return $this->client->sendRequest($this->lastRequest);

Can anybody help me solving this issue?