Index: fb.module =================================================================== --- fb.module (revision 3785) +++ fb.module (working copy) @@ -356,6 +356,16 @@ return NULL; } + if (Facebook::VERSION >= "3") { + $message = 'This version of modules/fb is compatible with Facebook PHP SDK version 2.x, but %version was found. Either upgrade modules/fb or downgrade %fb_platform.'; + $args = array('%fb_platform' => $fb_platform, '%version' => Facebook::VERSION); + if (user_access('access administration pages')) { + drupal_set_message(t($message, $args)); + } + watchdog('fb', $message, $args, WATCHDOG_ERROR); + return NULL; + } + // We don't have a cached resource for this app, so we're going to create one. $fb = new Facebook(array( 'appId' => $fb_app->id, Index: fb.install =================================================================== --- fb.install (revision 3785) +++ fb.install (working copy) @@ -62,9 +62,15 @@ $fb_platform = variable_get(FB_VAR_API_FILE, $fb_lib_path . '/src/facebook.php'); if (class_exists('Facebook')) { - $status['description'] = $t('Facebook PHP SDK loaded.'); - $status['severity'] = REQUIREMENT_OK; - $status['value'] = $t('Loaded'); + $status['value'] = Facebook::VERSION; + if (Facebook::VERSION >= "3") { + $status['description'] = $t('Expected version 2.x.y of Facebook PHP SDK.'); + $status['severity'] = REQUIREMENT_ERROR; + } + else { + $status['description'] = $t('Facebook PHP SDK loaded.'); + $status['severity'] = REQUIREMENT_OK; + } } elseif (include($fb_platform)) { // include() better than file_exists(). $status['description'] = $t('Facebook SDK found at %path',