artdarek / oauth-4-laravel

OAuth Service Provider for Laravel 4
684 stars 217 forks source link

Facebook login error StreamClient.php #91

Open tuyenlaptrinh opened 9 years ago

tuyenlaptrinh commented 9 years ago

My hosting enable open_ssl, allow_open_url.... i tried file_get_contents('https://facebook.com') => OK When i run auto login facebook. - Option 1 run url callback Example: http://demo.com/login/facebook I received one code (A) And i get all information i need - Option 2 I make a button login with facebook And i click thi button use same account facebook in Option 1 but i received another code (B) A # B. I don't understand. In Option 2 I received error

production.ERROR: exception 'OAuth\Common\Http\Exception\TokenResponseException' with message 'Failed to request resource.' in [PATH]\vendor/lusitanian/oauth/src/OAuth/Common/Http/Client/StreamClient.php:68

When i check file StreamClient.php I see error line.

$response = file_get_contents($endpoint->getAbsoluteUri(), false, $context);

Can i change StreamClient to CurlClient class? Please help me

FeliciousX commented 9 years ago

21 Use CurlClient instead of StreamClient

Hope this helps!