FQL query using stream table doesn't accept app access token
Posted
by
tougher
on Stack Overflow
See other posts from Stack Overflow
or by tougher
Published on 2012-06-27T15:05:06Z
Indexed on
2012/06/27
15:16 UTC
Read the original article
Hit count: 293
I've searched stackoverflow all day long to find an answer without luck, so here we go.
I'm trying to fetch data from the stream table like this:
FQL: SELECT post_id, message, created_time FROM stream WHERE source_id = 131559313586863
URL: http:// graph.facebook.com/fql?q=SELECT+post_id%2C+message%2C+created_time+FROM+stream+WHERE+source_id+%3D+131559313586863&access_token=10669xxxxx74470|PF-7GSdBx0Nxxxxxkdi1KwSQG-w
But I get a 400 Bad Request as response with the error message: "An access token is required to request this resource.".
I'm fetching an application access token with this url: https:// graph.facebook.com/oauth/access_token?client_id=FACEBOOK_APP_ID&client_secret=FACEBOOK_APP_SECRET&grant_type=client_credentials
Facebook state in this blog post that "You will need to pass a valid app or user access token to access this functionality.". Functionality refers to /feed and /posts (the stream table). Futhermore this wiki tells the same story about using the stream table, "From June 3 2011 a token is required to query this table. You can use any application or user token to make the query.".
Does anyone see my hopefully obvious flaw?
Please note:
- The profile in the FQL query is public.
- I need this to run userless though a cronjob. No user interaction is possible.
- The request works if I replace the app access token with my own user token from https:// developers.facebook.com/tools/explorer
Sorry for breaking the URL's. I need more reputation to post more than 2 links :-/
© Stack Overflow or respective owner