vc_ace
vc_ace

Reputation: 123

OAuthException using Socialite with facebook - "message": "An active access token must be used to query information about the current user.",

I have been using Socialite for a few days with Facebook without issue. Today, I started getting this error.

{ "error": 
    { 
       "message": "An active access token must be used to query information 
        about the current user.", "type": "OAuthException",
        "code": 2500, "fbtrace_id": "FTvIz9t1LT+"
   }
}

The error seems straight forward but I can't seem to see a solution online. Is there a way to reset my access_token using Socialite.

Please note: I pretty much followed this tutorial

The error is in the callback when I try and get the

$userProvider try { 
    $userProvider = Socialite::driver('facebook')->user();
} catch (Exception $e) {
   Log::info('Callback Error ' . $e->getMessage());
   return Redirect::to('redirect');
}

Thanks, Rich

Upvotes: 12

Views: 5463

Answers (3)

flamisz
flamisz

Reputation: 111

It is because v2.2 of Facebook API is no longer available. Update the laravel/socialite package:

composer update laravel/socialite

This way it won't affect your other packages.

Upvotes: 4

Kekson
Kekson

Reputation: 63

i think problem is parsing the token so changing this 2 lines should fix the problem

https://github.com/laravel/socialite/pull/214/files#diff-b221dafd8a91f5753288a2d8603cef25

Upvotes: 2

Tadeo Rod
Tadeo Rod

Reputation: 594

This was happening to me also. I fixed it running composer update and then composer dump-autoload. This will update Socialite to v2.0.21

Cheers

Upvotes: 30

Related Questions