ruby-on-railsfacebookfacebook-graph-apikoalaruby-on-rails-4.1

Fetching facebook friends using koala gem is not returning all the friends


The code I am using is directly from readme.

@graph = Koala::Facebook::API.new(oauth_access_token)
profile = @graph.get_object("me") // working perfectly fine..
friends = @graph.get_connections("me", "friends") // returning only my friends which are there in developer/admin list of the app.

Anything I am missing?

PS: App is not approved yet.


Solution

  • Facebook just release its API 2.0 which change many permissions and friend_* endpoint is one of them you can read more here. Your problem mentioned in the link as

    Friend list now only returns friends who also use your app: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app.