3

Hi I am using Koala gem and graph API for getting the Facebook information.

Here is sample implementation

def facebook_profile            
    a_token = current_user.facebook_oauth_setting.access_token
    @graph = Koala::Facebook::API.new(a_token)
    @picture = @graph.get_picture("me")
    @feed = @graph.get_connection('me', 'posts', {fields: ['id', 'message']})
end

and when I tried this I am getting following result

{"name"=>"Firstname Lastname", "id"=>"1053124034660975"}

But didn't get any feed or post.

I referred following links

https://github.com/arsduo/koala/wiki/Graph-API#getting-public-data

but getting the same issue.

Also checked the permissions on the facebook but getting the same issue.

So how can I get the feeds from the facebook or is there anything that I am missing.

preeti
  • 31
  • 2

1 Answers1

0

Usually you have to get permissions from the user before reading his information. According to documentation https://developers.facebook.com/docs/graph-api/reference/v2.5/user/feed you need to obtain user_posts permission

andrykonchin
  • 2,507
  • 3
  • 18
  • 24