facebook-fql

Facebook FQL user table `sex` field : how to return male/female even the user is using different locale?

痴心易碎 提交于 2020-01-01 01:13:53
问题 Situation: my facebook application ( http://apps.facebook.com/mymagicmirror/ ) needed to detect user's gender, and then query opposite sex or male or female FQL: SELECT uid, name, pic, sex FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user_id.') and sex='male' Problem: When the facebook user is using other locale, then the 'sex' field doesn't match 'male' and 'female' anymore. Instead, say in Chinese, the sex will become 男性 / 女性, and the FQL for where sex='male' will return

FQL facebook query language: how can i query the list of friends of a specific user that has my application installed?

笑着哭i 提交于 2019-12-31 17:12:15
问题 When a user logs in to my facebook application, i want to show him a list of all of his friends that has my application installed. can I use FQL to query who's of his friends have my application installed? and if so how ? thanks! 回答1: Actually, you can do pull list of friends who installed an app through FQL. SELECT uid, name, pic_square FROM user WHERE is_app_user AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) 回答2: You can do it like this also, if is_app_user=1 then its app user.

FQL Graph API: Mutual Friends

邮差的信 提交于 2019-12-31 07:07:13
问题 I know you can't get friends of friends, but can you get mutual friends using some query, in a computationally efficient manner? Could I even iterate through my friends to see which of them is friends with a target? Is there any good way to get Mutual friends? 回答1: You can do it like this: $facebook = new Facebook(array( 'appId' => FB_ID, 'secret' => FB_APP_SECRET, 'cookie' => true, )); $fql = "SELECT id FROM profile WHERE id IN (SELECT uid2 FROM friend WHERE uid1=me())"; $response =

How to get only friends with profile photos uploaded, and ignore those users with the default silhouette?

試著忘記壹切 提交于 2019-12-31 03:56:06
问题 I cannot figure a way get friends only with profile photos. I could use multi-query to check whether every friend has a photo, but that would incur heavy traffic. Are there any alternatives? 回答1: Although Gajus’ suggested query might work right now, it’ll break once Facebook changes the URL of the default picture on their CDN. (Might happen, might not happen.) So I’d suggest this for improvement: The profile_pic table has a field called is_silhouette , which is a boolean for whether the user

How to get Facebook likes count for a Facebook page?

こ雲淡風輕ζ 提交于 2019-12-30 05:21:11
问题 I am making GET request to Facebook graph API like: https://graph.facebook.com/Yahoo?fields=likes It is returning the likes count even if I am not logged in. But for URLs like: https://graph.facebook.com/CaraSutrasPage?fields=likes I am NOT getting the Facebook likes when I am not logged-in. The reason here is, this Facebook page is age-restricted. From this question, I tried including the User access_token like: https://graph.facebook.com/CaraSutrasPage?fields=likes&access_token=CAAGRLGYz..

Facebook friends email FQL

有些话、适合烂在心里 提交于 2019-12-29 08:23:01
问题 I have this FQL: $femail = $facebook->api(array( 'method' => 'fql.query', 'locale' => 'en_US', 'query' => 'SELECT email FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user_id.') AND uid = '.$friend_id.' ORDER BY name ASC', )); Here is the print_r result: Array ( [0] => Array ( [email] => ) ) I want to get friend's email address, but this query results in empty email values. Does I miss something in query? Does it even possible to get friends email? I tested with my partner, she

Facebook friends email FQL

荒凉一梦 提交于 2019-12-29 08:22:09
问题 I have this FQL: $femail = $facebook->api(array( 'method' => 'fql.query', 'locale' => 'en_US', 'query' => 'SELECT email FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user_id.') AND uid = '.$friend_id.' ORDER BY name ASC', )); Here is the print_r result: Array ( [0] => Array ( [email] => ) ) I want to get friend's email address, but this query results in empty email values. Does I miss something in query? Does it even possible to get friends email? I tested with my partner, she

After Oauth with facebook , how do I get the graph of the pages created by user?

泄露秘密 提交于 2019-12-25 11:50:09
问题 After OAuth with facebook , how do I get the graph of the pages created by user? I search over the documentation and event search inside the callback that facebook send me after the OAuth , I still can't get the pages that the user create , I have to use FQL for this? And how do I use FQL in rails? 回答1: You can use the graph api to query for this information after you have logged in using OAuth. Facebook uses an unintuitive name for this interface - accounts. The URL you are looking for is -

Quoting/escaping jsonpath elements for in clause of dependent fql queries

戏子无情 提交于 2019-12-25 09:52:32
问题 Using the facebook php sdk, I am trying to get a list of comments for every post made to a person's wall by someone else. I'm using FQL in a Batch API request as follows: $getStream = urlencode("method/fql.query?query=SELECT post_id, actor_id, target_id, source_id,viewer_id, message FROM stream WHERE app_id= '' and message != '' and source_id=$fbprofileId and target_id=$fbprofileId and is_hidden=0 limit 100"); $getComments = urlencode("method/fql.query?query=select object_id, post_id, fromid,

Quoting/escaping jsonpath elements for in clause of dependent fql queries

故事扮演 提交于 2019-12-25 09:51:21
问题 Using the facebook php sdk, I am trying to get a list of comments for every post made to a person's wall by someone else. I'm using FQL in a Batch API request as follows: $getStream = urlencode("method/fql.query?query=SELECT post_id, actor_id, target_id, source_id,viewer_id, message FROM stream WHERE app_id= '' and message != '' and source_id=$fbprofileId and target_id=$fbprofileId and is_hidden=0 limit 100"); $getComments = urlencode("method/fql.query?query=select object_id, post_id, fromid,