You are here

function fb_instant_articles_api_fb_app_details_submit in Facebook Instant Articles 7

Same name and namespace in other branches
  1. 7.2 modules/fb_instant_articles_api/includes/admin.inc \fb_instant_articles_api_fb_app_details_submit()

Submit handler for Facebook App details

1 string reference to 'fb_instant_articles_api_fb_app_details_submit'
fb_instant_articles_api_module_activation_fb_app_settings in modules/fb_instant_articles_api/includes/admin.inc
Generates Facebook App settings state of Module Activation section

File

modules/fb_instant_articles_api/includes/admin.inc, line 227
Settings for Facebook Instant Articles API module.

Code

function fb_instant_articles_api_fb_app_details_submit($form, &$form_state) {

  // Store the FB app details in the database
  variable_set('fb_instant_articles_api_app_id', $form_state['values']['fb_instant_articles_api_app_id']);
  variable_set('fb_instant_articles_api_app_secret', $form_state['values']['fb_instant_articles_api_app_secret']);

  // Clear out the token and FB page if there were ones in the database since they're invalid now
  variable_set('fb_instant_articles_api_access_token', '');
  variable_set('fb_instant_articles_page_id', '');
  variable_set('fb_instant_articles_page_name', '');
  $form_state['redirect'] = 'admin/config/services/fb-instant-articles/api';
}