Dave Rodger
Dave Rodger

Reputation: 83

Facebook FQL returning inconsistent results?

I've got a question around why some items are not returning via a Facebook FQL query.

The following query:

https://api.facebook.com/method/fql.query?query=select%20page_id,%20name,%20type,%20fan_count%20from%20page%20where%20name=%27Bauhaus%27%20and%20type%20=%20%27MUSICIAN/BAND%27%20order%20by%20fan_count%20desc

Is supposed to return me pages whose name = 'Bauhaus' and type is 'Musician/Band'. The result is:

<fql_query_response list="true">
<page>
<page_id>186907181359330</page_id>
<name>Bauhaus</name>
<type>MUSICIAN/BAND</type>
<fan_count>1</fan_count>
</page>
<page>
<page_id>175833025805207</page_id>
<name>Bauhaus</name>
<type>MUSICIAN/BAND</type>
<fan_count>0</fan_count>
</page>
</fql_query_response>

If I then add a constraint, page_id=109194179106090, which doesn't appear in the above list: https://api.facebook.com/method/fql.query?query=select%20page_id,%20name,%20type,%20fan_count%20from%20page%20where%20page_id%20=%20109194179106090, I get this result:

<fql_query_response list="true">
<page>
<page_id>109194179106090</page_id>
<name>Bauhaus</name>
<type>MUSICIAN/BAND</type>
<fan_count>100527</fan_count>
</page>
</fql_query_response>

Why should adding a constraint return me an item that isn't in the original query?

Upvotes: 1

Views: 486

Answers (1)

Kyle Sletten
Kyle Sletten

Reputation: 5413

In FQL, adding a constraint of a page id automatically adds it to the query, assuming that you know exactly what you want and won't be narrowing it down by other criteria.

Upvotes: 1

Related Questions