Search code examples
ruby-on-railsfacebookfacebook-graph-apikoala

Rails Koala get_connections(post_id) returns 100, no such API call


So, I've been stuck the last few hours on something that to me, seems quite weird.

What I'm trying to do is get the likes of a post through the Facebook graph API using Koala. Sounds simple enough.

using

@likes = @graph.get_connections("#{post_id}", "likes")

This should return an array of id's from the likes of the post, and using graph explorer, I can do this.

What I do is this: I get the id for the post from the Graph API, and let's say it's the final post of myself. So I get the id from the first post in the array of get_connections("me", "posts"). And I can also do this via the graph explorer. But when I get the likes from that id, graph explorer gives me an array of id's (no problem there) and Koala returns: 100, no such request.

Does anyone know how I should be able to fix this?

EDIT:

I think the problem lies within getting something using the post_id that's build up like: UserID_PostID, since using this on post = get_object("#{post_id}") doesn't work either


Solution

  • The problem was that my access codes weren't refreshed somehow, when I got them refreshed, it was solved. So to anyone experiencing the same problem, I would suggest checking your access tokens