You are here

function social_auth_facebook_requirements in Social Auth Facebook 8

Implements hook_requirements().

Checks that a compatible version of Facebook Graph SDK has been installed with Composer. Check installation instructions from the README.txt.

File

./social_auth_facebook.install, line 17
Install, update, and uninstall functions for the Social Auth Facebook module.

Code

function social_auth_facebook_requirements($phase) {
  $requirements = [];

  // Social API should be installed at this point in order to check library.
  \Drupal::service('module_installer')
    ->install([
    'social_api',
  ]);
  if ($phase == 'install') {
    $requirements = SocialApiImplementerInstaller::checkLibrary('social_auth_facebook', 'Social Auth Facebook', 'facebook/graph-sdk', 5.0, 6.0);
  }
  return $requirements;
}