1

I have set this in the initializer

Rails.application.config.middleware.use OmniAuth::Builder do
    provider :facebook , 'app' , 'secret' , {:scope => "manage_pages"}
end

And I have saved the token in User model after the callback.

How do I use the token to request for https://graph.facebook.com/${current_user.uid}/accounts?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
wizztjh
  • 6,979
  • 6
  • 58
  • 92
  • 1
    I don't know about facebook, but maybe look around this thread maybe the infos provided in this thread will help you out : http://stackoverflow.com/questions/4187178/omniauth-pulling-tweets-fb-places-etc – Marcel Falliere Nov 26 '10 at 08:35
  • I have tried that but it is not working for facebook – wizztjh Nov 26 '10 at 13:08

1 Answers1

2

With the Facebook ID you can query the Facebook Graph. Have a look at fb_graph gem: https://github.com/nov/fb_graph, it is a Facebook API wrapper.

rtacconi
  • 14,317
  • 20
  • 66
  • 84