I'm using devise and omniauth-facebook authentication in my rails 4 application.
Facebook has moved on to v2.x graph API. (deadline for api migration is April 30, 2015).
During authentication, facebook's login dialog show the following message
"You must upgrade this app to Graph API v2.x
v1.0 will be deprecated on April 30, 2015
Learn how to upgrade"
I figured this is because omniauth-facebook/devise right now uses facebook graph api v1.x.
How do I configure it to point to v2.x ?
In the App Dashboard Settings > Advanced, scroll to the Upgrade API Version section.
The API version is listed with the release of each version of the Facebook SDK for Android. Much like the JavaScript SDK, the version is prepended to any calls you make to the graph API through the Facebook SDK for Android.
API Version Deprecations: As part of Facebook's Graph API and Marketing API, please note the upcoming deprecations: August 3, 2021: Graph API v3. 3 will be deprecated and removed from the platform. August 25, 2021 Marketing API v9.
Found the solution, hope it helps someone as well
The link is https://github.com/mkdynamic/omniauth-facebook/issues/152
Solution is to configure provider for omniauth-facebook in initializer file as:
provider :facebook, ENV['APP_ID'], ENV['APP_SECRET'],
:scope => 'email,read_stream',
:client_options => {
:site => 'https://graph.facebook.com/v2.0',
:authorize_url => "https://www.facebook.com/v2.0/dialog/oauth"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With