Facebook: FQL for fetching all posts on a managed page throws one of two exceptions

Go To StackoverFlow.com

0

I am using the RestFB client to fetch all post_ids of a Facebook Page.

The query is

select post_id from stream where source_id=265813166783408

Where the id if of the page I'm querying. It can be found here

I initially tried executing this without an access token. This gives a 104: Requires valid signature error from Facebook.

I looked up this error and the solution that many gave on SO is to use an access token. However if I try with an accessToken (with permissions: manage_pages, publish_stream, read_stream, offline_access, read_insights) then Facebook gives a different error 190: Impersonated access tokens can only be used with the Graph API.

Does this mean I shouldn't use FQL for getting page posts. The Facebook documentation doesn't mention anything on these lines but like I said it keeps alternating between these two errors.

PS: I can use the Graph API with my access token to fetch Posts but for my specific scenario I felt FQL would be a far better option, since I can nest this query into a query on the comments table (eventual aim).

Thank you.

UPDATE:

Please see Facebook developers for a discussion on this particular issue If you are using the RestFB library then also see the relevant issue

2012-04-04 08:01
by Sagar V
Have you found anything on this matter. I have the same problem when making a request using fql and page access_token? Is there a work around - NimmoNet 2012-06-11 21:36
@NimmoNet - None so far. I am using Graph API to fetch Posts and then switching to FQL for comments - Sagar V 2012-06-12 02:45


1

We encountered the same problem and found it to be an issue with using fbclient library and a page access token. We switched to calling the API directly (with the Apache HttpClient) and our FQL ran fine with the page access tokens.

2012-06-29 02:57
by bflorian
Oh is that the case? I will try this out and let you know. Thanks - Sagar V 2012-07-17 06:22
The RestFB library that I am using currently uses the deprecated endpoint for read only queries. The current unreleased library has a new function to handle this issue so am currently maintaining a local workaround. You were on the right track so I will accept your answer : - Sagar V 2013-01-04 05:17
Ads