Question

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?

Was it helpful?

Solution

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.

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