wizztjh
wizztjh

Reputation: 7041

How do I use the access token in omniauth for Facebook?

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?

Upvotes: 1

Views: 3170

Answers (1)

rtacconi
rtacconi

Reputation: 14769

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.

Upvotes: 2

Related Questions