You are here

social_auth_facebook.install in Open Social 8.8

Install and uninstall functions for the Facebook Login module.

File

modules/custom/social_auth_facebook/social_auth_facebook.install
View source
<?php

/**
 * @file
 * Install and uninstall functions for the Facebook Login module.
 */

/**
 * Implements hook_requirements().
 */
function social_auth_facebook_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!class_exists('\\Facebook\\Facebook', TRUE)) {
      $requirements['social_auth_facebook'] = [
        'description' => t('Social Auth Facebook requires Facebook PHP Library. Make sure the library is installed via Composer.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}

Functions