English 中文(简体)
利用FQL,只从Facebook API中收回即将到来的出生日
原标题:Using FQL to retrieve only upcoming birthdays from Facebook API
问题回答

这是几个月后,但也许会帮助面临同样问题的其他人。 基本上,FQLIN的操作者没有检查该数值是否属于某一范围,但该数值是否与所提供的任何不同数值相符。 举例来说,如果价值为09和10岁,那么9月和10月份的所有出生日都将返回,因为这些出生月数与规定的月份数相符。

What you can do is calculate the following values using PHP or whatever other language you are using and use them in your FQL (today is 17 March and say we want 17 April is end date):

  • Today s day of the month (17),
  • Today s month of the year (03)
  • End date day of the month (17)
  • End date month of the year (04)

保证日数和月数分别采用d和MM(如果是单一数字,则增加零)。 之后,贵方论坛希望:

      SELECT name, birthday_date
      FROM user 
      WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
      AND strlen(birthday_date) != 0
      AND ((substr(birthday_date, 0, 2) =  03 
      AND substr(birthday_date, 3, 5) >=  17 )
      OR (substr(birthday_date, 0, 2) =  04 
      AND substr(birthday_date, 3, 5) <  17 ))
      ORDER BY birthday_date

之后,3月17日至4月17日期间,亲爱的朋友将返回。

你们还可以让联邦劳工局为你们做一些工作,例如:

SELECT uid, name, birthday_date, strtotime(substr(birthday_date, 0, 5)) > now()
FROM user
WHERE uid in (SELECT uid2 FROM #freunde)
AND birthday_date <>   
AND strpos(birthday_date, 06 ) = 0
ORDER BY substr(birthday_date, 0, 5)

returning a boolean type "anon" field telling if you have to include this result in the display list (true) or if the birthday for this user lies already in the past (false). Unfortunately I wasn t able to have this proposition work as a WHERE clause - keep getting the error under, but would love to know if someone was luckier than I.

  "error": {
    "message": "Call to a member function on a non-object", 
    "type": "BadMethodCallException"
  }




相关问题
Facebook Connect login dialog not working

I am using Facebook Connect for iPhone and following the official instructions. I use the following code to display the login dialog: FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:...

Facebook App Profile Tab is Empty ... No Content Displayed?

I can view my application via the http://apps.facebook.com/myapplication/ link and the content shows up correctly. I also added the application as a tab to a facebook page. However, when viewing the ...

Facebook Platform error: "Object cannot be liked"

I m working on a Facebook Application that generates wall posts. In testing these posts, I ve discovered that the Facebook Platform action of "liking" a post is failing. The specific error message ...

how to call showPermissionsDialog() in php (facebook api)?

I was reading over the documentation yet I could not figure out how to call Facebook.showPermissionsDialog() in php include_once ./facebook-platform/php/facebook.php ; $facebook = new Facebook(my ...

Facebook connect

If I plug in the facebook connect into my website, How can I prevent double signups? Lets say I have a user that s already signed up to my site but he clicked the connect with facebook, is there a ...

热门标签