Question

I'm attempting to do some complex Facebook graph queries. I want to retrieve a user's timeline only from specific apps. Here's what I have:

https://graph.facebook.com/me?fields=home.filter(app_2915120374).limit(20).fields(...)&access_token=...

So that works great, however, what if I want to do multiple apps? Providing multiple filters inside .filter() outputs an error.

https://graph.facebook.com/me?fields=home.filter(app_2915120374,app_2305272732).limit(20).fields(...)&access_token=...

{
    error: {
        message: "(#606) Invalid filter_key app_2915120374,app_2305272732",
        type: "OAuthException",
        code: 606
    }
}

I'd rather not perform multiple requests, since that can take awhile. And, plus, it's not one unified feed. Ex: if I pull 20 statuses, then 20 photos, there will be some gaps in the timeline.

And NO, I don't want to use FQL.

Was it helpful?

Solution

I tested a little, and I assume that you can only pass one stream filter at once. This would also be consistent to the docs at https://developers.facebook.com/docs/graph-api/reference/v2.0/user/home/ stating that

Retrieve only posts that match a particular stream filter. Valid filters to be used here can be retrieved using the FQL stream_filter table.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top