简体   繁体   中英

Php Facebook api request for birthday

I've got a website that uses register/login with facebook account. It's working fine, but i would like to also retrieve the user birthday.

All the requests that i make to graph the birthday does not come. If i only request birthday, it only comes with id.

I'm testing with my own account... and i've got the permissions for birthday set to public, and in the dev apps, the App permissions, are set to: user_about_me, user_birthday.

But i still cannot request birthday. Any ideas?

thanks

You have to add the permissions in your login code. Just like this-

[if using Javascript SDK]

FB.login(function(response) {

}, {scope: 'user_about_me,user_birthday'});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM