Topic-icon Getting Birthday as NULL from Facebook

Active Subscriptions:

None
11 years 11 months ago #45054 by pawan.m
Hi, We are using this code for getting a new usersBirthday from Facebook to complete registration: but getting Birthday as NULL. Can you help?
JFBConnectModelLoginRegister Class in com_jfbconnect/models/loginregister.php:
function autoCreateUser($providerUserId, $provider)
{
$provider->setInitialRegistration();

$profile = $provider->profile->fetchProfile($providerUserId, array('first_name', 'last_name', 'email', 'full_name','birthday'));
The topic has been locked.
Support Specialist
11 years 11 months ago #45063 by alzander
I'm not sure why you're grabbing that information like that. I'd highly recommend using a socialprofile plugin to import the users information on registration, as it will handle fetching the profile data and requesting the proper permissions from the user.

With that said, the issue is likely that the user isn't being asked, or isn't granting, the user_birthday permission. If you request that profile field using a socialprofile plugin, JFBConnect will automatically request that permission. If not, please set that permission as an additional request in the Configuration -> Facebook area.

I hope that helps explain,
Alex
The topic has been locked.