4

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?

mpalencia
  • 5,481
  • 4
  • 45
  • 59
  • 1
    API calls to lower versions that are not active any more, are automatically upgraded to the lowest version available on the receiving end. Since things change between API versions, it might mean that not all coding works the same any more for a new API version - so that is probably why they did not make it configurable, but hard-coded it instead. – 04FS Feb 04 '20 at 08:14
  • thanks for the input :) – mpalencia Feb 04 '20 at 23:07
  • According to https://developers.facebook.com/docs/apps/versions/ For APIs, once a version is no longer usable, any calls made to it will be defaulted to the next oldest, usable version. – 尤川豪 Apr 25 '20 at 23:58

1 Answers1

7

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

Matteo
  • 37,680
  • 11
  • 100
  • 115