You are here

function feeds_youtube_revoke_authentication in Feeds: YouTube Parser 7.3

Custom menu callback to revoke Google API access token.

Return value

string HTML link to authenticate user on Google API.

1 string reference to 'feeds_youtube_revoke_authentication'
feeds_youtube_menu in ./feeds_youtube.module
Implements hook_menu().

File

includes/admin.inc, line 78
admin functionality implementation.

Code

function feeds_youtube_revoke_authentication() {
  $client = feeds_youtube_googleapi_youtube_client_factory();
  $feeds_youtube_api_settings = variable_get('feeds_youtube_api_settings', array());
  $client
    ->revokeToken($feeds_youtube_api_settings['token']);
  $feeds_youtube_api_settings = array();
  variable_set('feeds_youtube_api_settings', $feeds_youtube_api_settings);
  drupal_set_message(t('Google Api Access Revoked.'));
  drupal_goto('admin/structure/feeds/google-api-authentication');
}