Cleans up FB settings for hybrid auth.
*/
function fb_settings_cleanup($form, &$form_state){
// Cleans up scope values for FB integration.
foreach (array_keys($form_state['values']['hybridauth_provider_Facebook_scope']) as $key){
if (!$form_state['values']['hybridauth_provider_Facebook_scope'][$key]) {
unset($form_state['values']['hybridauth_provider_Facebook_scope'][$key]);
}
}
}
In order to enabled Facebook login on the site (suing the HybridAuth module and library), we need a Facebook application.
This is doable from https://developers.facebook.com/apps You must set Site URL to http://2014.drupalcampmontreal.com/ If requested, the return URI should be http://2014.drupalcampmontreal.com/hybridauth/endpoint?hauth.done=Facebook
Then visit http://2014.drupalcampmontreal.com/fr/admin/config/people/hybridauth/provider/Facebook?destination=admin/config/people/hybridauth to add the created application ID and consumer secret.