Closed Bigspecialk closed 4 years ago
Yeah, the problem is the plugin is ignoring the contacts import is disabled and sending the request for user’s friends anyway. So the solution is to either use the contacts feature and get the permission for your app on facebook, or for someone to add the logic to the code.
Specifically, user_friends should probably be removed here I am guessing, and then added in only if the user enabled the contacts feature.
Thank you for the help. I tried looking for that file in the Plugin and couldn't find it to edit. Do you know if it would be called something else?
+1
+1 The Plugin is unusable without this issue being resolved.
There is a filter to fix this. wsl_hook_alter_provider_scope
Example add_filter( 'wsl_hook_alter_provider_scope', 'virtus_wsl_hook_alter_provider_scope', 10, 2 );
function virtus_wsl_hook_alter_provider_scope( $provider_scope, $provider ) {
if ( $provider == 'Facebook' ) {
$provider_scope_new = str_replace( ', user_friends', '', $provider_scope );
return $provider_scope_new;
}
return $provider_scope;
}
As @alexxgathp said " user_friends " should be removed. but the directory was changed you can find it in wsl.providers.php:line 46 in the directory wordpress-social-login\wordpress-social-login\includes\settings
"default_api_scope" => "email, public_profile, user_friends",
plugin version is 2.3.3
delete " , public_profile, user_friends","
In trying to setup Facebook login I get the below message.
Invalid Scopes: user_friends. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions
It appears there is an issue in asking for the user_friends.
Any ideas on how to fix?