FQL 用于检索即将到来的生日

发布于 2024-12-22 04:37:49 字数 90 浏览 1 评论 0原文

我正在尝试通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜扑 2024-12-29 04:37:49

要解析日期,请使用类似以下条件的内容,但它仅提供截至 12 月的生日:

$fromDate = date('m/d');
"SELECT uid, name, birthday, birthday_date,substr(birthday_date,0,3)
 FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
     AND birthday_date>='$fromDate'  order by birthday_date"

To parse the date, use something like following condition but it provides birthdays only up to december:

$fromDate = date('m/d');
"SELECT uid, name, birthday, birthday_date,substr(birthday_date,0,3)
 FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
     AND birthday_date>='$fromDate'  order by birthday_date"
梦一生花开无言 2024-12-29 04:37:49

要访问朋友的生日,您必须请求 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 by select 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!!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文