I am using Laravel version 5.4.36 and I am using Laravel Sociallite plugin to connect users with Facebook.
Now, I want to get Logged in user information like birth date gender, Address, mobile number, or any permissions given in this Facebook official document.
I have tried the following code
$facebookScope = [
'user_birthday',
'user_location',
];
$facebookFields = [
'name', // Default
'email', // Default
'gender', // Default
'birthday', // I've given permission
'location', // I've given permission
];
return Socialite::driver('facebook')->fields($facebookFields)->scopes($facebookScope)->redirect();
Now when I click on login with the Facebook button it shows error like
Invalid Scopes: user_birthday, user_location. 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
I have tried different scopes like field name = age and scope = user_age_range field name = birthday and scope name = user_birthday for field name = friends and field name = user_friends
For every scope that I used I get the error of invalid scope.
Am I doing something wrong? Do I need to change something in the Facebook application that I have created for login?
Please suggest.