Reduce facebook permissions using wsl_lower_facebook_permissons
-
Hi
First of all thank you for the great plugin!
Really saved me a lot of hard work.The issue I’m facing is that I want to reduce the number of permissions being asked of facebook users.
I followed the documentation and tried using the filter wsl_hook_alter_provider_scope.
In the documentation, the following example is given:
function wsl_lower_facebook_permissons( $provider_scope, $provider )
{
if( ‘facebook’ == $provider )
{
# https://developers.facebook.com/docs/facebook-login/permissions
$provider_scope = ’email, user_about_me’;
}return $provider_scope;
}
add_filter( ‘wsl_lower_facebook_permissons’, ‘wsl_lower_facebook_permissons’ );I changed it according to my needs, following is my code:
function wsl_lower_facebook_permissons( $provider_scope, $provider )
{
if( ‘facebook’ == $provider )
{
# https://developers.facebook.com/docs/facebook-login/permissions
$provider_scope = ’email, public_profile’;
}return $provider_scope;
}
add_filter( ‘wsl_hook_alter_provider_scope’, ‘wsl_lower_facebook_permissons’ );PS: I figured the add filter line in the example has an error, so I changed it in my code.
I added this code to the functions.php file of the theme.
But the problem is that it’s not working.
Can you please guide me in the right direction?Much appreciated! ??
https://www.ads-software.com/plugins/wordpress-social-login/
- The topic ‘Reduce facebook permissions using wsl_lower_facebook_permissons’ is closed to new replies.