Please follow only the official docs to avoid such mistakes-
You are adding the permissions scope into the wrong place.
You are using the wrong permissions:
gender,age_range,name,likes
- these are not valid permissions!Permissions that you require are:
user_likes
(for likes),user_birthday
(for birthday); rest are the part of the basic(default) permissions only!The age range field is also included in the public profile- for anyone who installs your app.
You have to add the scope
parameter while using the login code: getLoginUrl().
$params = array(
'scope' => 'user_likes, user_birthday'
);
$loginUrl = $facebook->getLoginUrl($params);
After the user successfully grants the permissions, you'll get the required things!