FQL 用于检索即将到来的生日
我正在尝试通过 FQL 从 Facebook 检索即将到来的生日
有没有办法做到这一点?
我尝试在网上搜索它,但无法获得它的工作版本。
I am trying to retrieve the upcoming birthdays from Facebook via the FQL
Is there a way to do it?
I have tried searching it online, but couldn't get a working version of it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要解析日期,请使用类似以下条件的内容,但它仅提供截至 12 月的生日:
To parse the date, use something like following condition but it provides birthdays only up to december:
要访问朋友的生日,您必须请求
friends_birthday
权限。完成后,您可以通过select name,birthday from user where uid in (SELECT uid2 FROMfriend WHERE uid1 = me())
从这个列表中您可以看到有些人有空值来获取每个朋友的生日(那些没有与经过身份验证的用户共享生日的用户),有些只有月/日,有些则有完整的月/日/年。因此,准确解析这些内容将取决于您。快乐编码!!To get access to friends birthdays you have to request
friends_birthday
permissions. Once that is done, you can get each friend's birthday byselect name, birthday from user where uid in (SELECT uid2 FROM friend WHERE uid1 = me())
From this list you can see some people have nulls (the ones who didn't share their birthday with the authenticated user), some have just month/day and some have full month/day/year. So it'll be up to you to accurately parse these. Happy coding!!