Ad

Laravel Socialite Specify Facebook Graph Version

Currently on Laravel 6 if you install Socialite and check the code on vendor, what they are using to get Facebook details is defaulted to version 3.3. You can check it in:

vendor/laravel/socialite/src/Two/FacebookProvider.php

This version of graph might be deprecated (not sure but if you check the facebook graph api explorer you can't use lower versions, only v5.0 or v6.0 as of this moment ). If ever is there a way to specify default Facebook graph version when using it on socialite?

Ad

Answer

As described in the CHANGELOG, with the version v4.3.0 you can change default graph version, manually set desired version, as example:

Socialite::driver('facebook')->usingGraphVersion('v5.0')

See this pr for further details

Ad
source: stackoverflow.com
Ad