You are here

function fbconnect_post_remove_callback in Facebook Connect 6

Same name and namespace in other branches
  1. 6.2 fbconnect.module \fbconnect_post_remove_callback()

The post-remove callback for facebook. Unlinks facebook account from the linked drupal one.

@todo Test it

1 string reference to 'fbconnect_post_remove_callback'
fbconnect_menu in ./fbconnect.module
Implementation of hook_menu().

File

./fbconnect.module, line 864

Code

function fbconnect_post_remove_callback() {
  if ($fb = facebook_client()) {
    $fbuid = $fb
      ->get_loggedin_user();
    if ($fbuid && $fb->fb_params['uninstall'] == 1) {

      //The user has removed your app
      fbconnect_unregister($fbuid);
      watchdog('fbconnect', "User with fbuid @fbuid has revoked authorization", array(
        '@fbuid' => $fbuid,
      ));
    }
  }
}