fql.multiquery

fql.multiquery returning empty array

匆匆过客 提交于 2019-12-08 12:01:11
问题 I'm am trying to query all the photo albums of a page and get each albums cover photo. Below is the code I have that returns an empty result. I am able to make both the queries separately without the problem, so it is not a permissions issue. $album_fql = "SELECT aid, owner, name, object_id, cover_pid, cover_object_id FROM album WHERE owner = 'xxxxxxx'"; $albumpic_fql = "SELECT pid, src_small FROM photo WHERE pid IN (SELECT cover_pid FROM #query1)"; $album_param = array( 'method' => 'fql

Retrieving posts and comments from a Facebook page

守給你的承諾、 提交于 2019-12-07 07:02:23
问题 I want to retrieve all of the posts from a given facebook page along with the associated comments. I wrote this code (app details obfuscated, replace with your own in order to run it). <?php require_once('facebook.php'); $facebook = new Facebook(array( 'appId' => 'MY_APP_ID', 'secret' => 'MY_APP_SECRET', 'cookie' => true, )); $pages = array( "stackoverflow" => 11239244970 ); $result = $facebook->api(array( 'method' => 'fql.multiquery', 'queries' => '{ "posts": "select post_id, source_id,

Retrieving posts and comments from a Facebook page

℡╲_俬逩灬. 提交于 2019-12-05 16:32:09
I want to retrieve all of the posts from a given facebook page along with the associated comments. I wrote this code (app details obfuscated, replace with your own in order to run it). <?php require_once('facebook.php'); $facebook = new Facebook(array( 'appId' => 'MY_APP_ID', 'secret' => 'MY_APP_SECRET', 'cookie' => true, )); $pages = array( "stackoverflow" => 11239244970 ); $result = $facebook->api(array( 'method' => 'fql.multiquery', 'queries' => '{ "posts": "select post_id, source_id, actor_id, target_id, likes, message from stream where source_id = '.$pages["stackoverflow"].'", "comments":

Starting multiquery in client throws parser error

不打扰是莪最后的温柔 提交于 2019-12-03 21:33:41
I have a following problem in c# SDK: when I try to run multiquery in my desktop application with following string (searching for pairs of IDs of mutual friends) I get a parser error: string strCommonFriendsQuery = "{ \"user_friends\":\"SELECT uid2 FROM friend WHERE uid1 = me()\", \"mutual_friends\":\"SELECT uid1, uid2 FROM friend WHERE uid1 IN (SELECT uid2 FROM #user_friends) AND uid2 IN (SELECT uid2 FROM #user_friends)\" }"; fb.Query(strCommonFriendsQuery); Parser error: unexpected '{' at position 0. The same string (without the escape sequences before quotation marks) works if I paste it to

How do I use the result from FB FQL multiquery?

夙愿已清 提交于 2019-11-30 09:20:49
I'm confused by Facebook's fql.multiquery method. I'm trying to retrieve all the comments on a post, and then the user information for each one as well. I can get the comments without any problem, but I'm having trouble getting the users. Currently I'm using the following: FB.api({ method: 'fql.multiquery', queries: { query1: 'SELECT post_fbid, fromid, text, time FROM comment WHERE post_id="'+postID +'"', query2: 'SELECT id, name, url, pic FROM profile WHERE id IN (SELECT fromid FROM #query1)' } }, function(response) { } }) This gives me the following response: [ { "name": "query1", "fql

How do I use the result from FB FQL multiquery?

允我心安 提交于 2019-11-29 13:55:16
问题 I'm confused by Facebook's fql.multiquery method. I'm trying to retrieve all the comments on a post, and then the user information for each one as well. I can get the comments without any problem, but I'm having trouble getting the users. Currently I'm using the following: FB.api({ method: 'fql.multiquery', queries: { query1: 'SELECT post_fbid, fromid, text, time FROM comment WHERE post_id="'+postID +'"', query2: 'SELECT id, name, url, pic FROM profile WHERE id IN (SELECT fromid FROM #query1)

Facebook FQL multiquery in iOS SDK

混江龙づ霸主 提交于 2019-11-28 23:59:48
I am looking for some documentation or sample code on how to send multiquery fql requests to Facebook via iOS SDK. I found some older samples but they doesnt work for me. I have populated an NSDictionary with the queries and I try to send the request via [[FBRequest requestWithDelegate:self] call:@"facebook.fql.multiquery" params:params]; , as stated in the samples I have read, but I get an "unrecognized selector sent to class" error and I cant find the "requestWithDelegate" method in FBRequest.h either. Is it deprecated? Some help on this would be very appreciated! // Construct your FQL Query

Facebook mutual friends and FQL 4999/5000 record limit

我与影子孤独终老i 提交于 2019-11-28 05:34:06
I'm trying to select all mutual friends' connections with PHP/FQL. Using my UID (540 friends), which means >12,000 connections, of which >6500 are unique. So this code should return all the connections but Facebook apparently has a 4999/5000 row limit on FQL queries. // select mutual unique friends $unique_connections = $facebook->api_client->fql_query(" SELECT uid1, uid2 FROM friend WHERE uid1 IN (SELECT uid2 FROM friend WHERE uid1=$uid) AND uid2 IN (SELECT uid2 FROM friend WHERE uid1=$uid) "); I know the numbers above because the original code I wrote loops through my friend list and sends a

Facebook FQL multiquery in iOS SDK

断了今生、忘了曾经 提交于 2019-11-27 15:09:20
问题 I am looking for some documentation or sample code on how to send multiquery fql requests to Facebook via iOS SDK. I found some older samples but they doesnt work for me. I have populated an NSDictionary with the queries and I try to send the request via [[FBRequest requestWithDelegate:self] call:@"facebook.fql.multiquery" params:params]; , as stated in the samples I have read, but I get an "unrecognized selector sent to class" error and I cant find the "requestWithDelegate" method in

Facebook mutual friends and FQL 4999/5000 record limit

随声附和 提交于 2019-11-27 00:58:47
问题 I'm trying to select all mutual friends' connections with PHP/FQL. Using my UID (540 friends), which means >12,000 connections, of which >6500 are unique. So this code should return all the connections but Facebook apparently has a 4999/5000 row limit on FQL queries. // select mutual unique friends $unique_connections = $facebook->api_client->fql_query(" SELECT uid1, uid2 FROM friend WHERE uid1 IN (SELECT uid2 FROM friend WHERE uid1=$uid) AND uid2 IN (SELECT uid2 FROM friend WHERE uid1=$uid)