LoginSignup
12
11

More than 5 years have passed since last update.

FQL: いろいろな条件式

Last updated at Posted at 2012-07-08

FacebookのFQLで役に立つ条件式

*** 特定の文字列や値の一致***

select name from user where strpos(lower(name), 'imoto') >= 0 and uid in (select uid2 from friend where uid1 = me() )

appを利用しているuserのみを抽出

select name from user where is_app_user=1 and  uid in (select uid2 from friend where uid1 = me() )

8月5日が誕生日の人

select  uid , name , birthday from user where uid in (select uid2 from friend where uid1 = me() ) AND substr(birthday_date, 0, 5) = "08/05"

offset , order , limit の利用


select  uid ,  name  from user where uid in (select uid2 from friend where uid1 = me() ) order by uid desc limit 2 , 2

自分のwallで見える、友だちからの投稿に対して、いいね!を付けた日付順

SELECT created_time , post_id, actor_id, target_id, message  FROM stream WHERE  likes.user_likes=1  and  source_id in (select uid2 from friend where uid1 = me()  ) AND created_time >1341602545 order by created_time desc LIMIT 50

自分が過去に”いいね!”を押したFacebook page


SELECT name, description , website , fan_count FROM page WHERE page_id in ( SELECT id  FROM object_url WHERE url in (select url from url_like where user_id=me() ))
12
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11