Hi, I'm using https://github.com/oriceon/oauth-5-laravel this is a simple laravel 5 service provider (wrapper) for Lusitanian/PHPoAuthLib which provides oAuth support in PHP 5.4+ and is very easy to integrate with any project which requires an oAuth client.
I am trying to login with facebook but I get this error:
This is my code:
public function loginWithFacebook(Request $request)
{
// get data from request
$code = $request->get('code');
// get fb service
$OAuth = new \OAuth();
$OAuth::setHttpClient('CurlClient');
$fb = $OAuth::consumer('Facebook', 'http://logos.dev/api/auth/facebook/');
// check if code is valid
// if code is provided get user data and sign in
if (!is_null($code)) {
// This was a callback request from facebook, get the token
$token = $fb->requestAccessToken($code);
// Send a request with it
$result = json_decode($fb->request('/me'), true);
dd($result);
} else {
// get fb authorization
$url = $fb->getAuthorizationUri();
// return to facebook login url
return redirect((string)$url);
}
}
Hi, I'm using https://github.com/oriceon/oauth-5-laravel this is a simple laravel 5 service provider (wrapper) for Lusitanian/PHPoAuthLib which provides oAuth support in PHP 5.4+ and is very easy to integrate with any project which requires an oAuth client.
I am trying to login with facebook but I get this error:
This is my code:
This is my facebook settings: