Talk:Fql.query

From Facebook Developer Wiki

Jump to: navigation, search

[edit] Affiliation Names Vary from Minute to Minute

I run this fqlquery: $fql = "SELECT first_name, affiliations FROM user WHERE uid IN (".$user.")"; $userdata = $facebook->api_client->fql_query($fql);

One minute, I get this response: Array ( [0] => Array ( [first_name] => Mark [affiliations] => Array ( [0] => Array ( [nid] => 16777230 [name] => Duke [type] => college [status] => Alumnus/Alumna [year] => 0 ) [1] => Array ( [nid] => 16777323 [name] => Miami [type] => college [status] => Alumnus/Alumna [year] => 0 ) [2] => Array ( [nid] => 67108866 [name] => New York, NY [type] => region [status] => [year] => 0 ) ) ) )

The next minute, I get this response: Array ( [0] => Array ( [first_name] => Mark [affiliations] => Array ( [0] => Array ( [nid] => 16777230 [name] => Duke [type] => college [status] => Alumnus/Alumna [year] => 0 ) [1] => Array ( [nid] => 16777323 [name] => UMiami [type] => college [status] => Alumnus/Alumna [year] => 0 ) [2] => Array ( [nid] => 67108866 [name] => New York, NY [type] => region [status] => [year] => 0 ) ) ) )

Notice that Miami changes to UMiami in a manner that is completely arbitrary. For several years this query returned UMiami consistently and now all the sudden this is not working.

Please file a bug. Thanks, Pete -- 563683308 09:28, 12 October 2009 (PDT)

[edit] Error 1: Out of Memory

If the user has a large number of friends (~>2000) this simple query fails:

  * SELECT uid,first_name,last_name,birthday_date FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=13736655983245128512..1 NDuid2=uid2)

Yes... we can restructure with LIMIT, but that's quite a hassle. That's not an unreasonably large query. Can you bump up the buffer size? --21008544 12:07, 3 August 2009 (PDT)

I am having the same problem... Any idea how to resolve this? --[User:654211204]



Hi, do you have any simple example of using any of these 4 functions with PHP APIs library:

  • data.setUserPreference
  • data.setUserPreferences
  • data.getUserPreference
  • data.getUserPreferences

I can't find out any example of colling these functions.

Thanks.

Can anyone refer me to the up to date working example of how to call FB API from Coldfusion for FBML aplications? I used Gavin Vincent's FBMLClient.cfc but it is not working for me... Thanks in advance!

Hi Alex, you might have better success if you post your question on the ColdFusion page. -- Pete (563683308 12:14, 18 June 2009 (PDT))


[edit] Need session in FQL query or not?

Is there a reason a call to fql.query fails ("Session key invalid or no longer valid") when querying tables in Data Store and not specifying a session key? I would think that an application should have access to its own tables in Data Store even if there is no user session... Is this the desired behavior, or is it something that will be corrected in the future? Thanks! PS: I'm using PHP client library. --3300895 07:21, 11 July 2009 (PDT)

We're looking into this. Thanks for reporting -- you shouldn't need a session to make the calls. If this persists for a couple of weeks, please file a bug. Thanks, Pete (563683308 12:14, 13 July 2009 (PDT))
thanks! will do. --3300895 18:04, 15 July 2009 (PDT)
I've filled this as http://bugs.developers.facebook.com/show_bug.cgi?id=6449 -- Jiri


SELECT location, link FROM album WHERE owner=http://www.facebook.com/inbox/?compose&id=1757105514

reference