Skip to content

Commit

Permalink
Add information about changes in API version >= 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Szyndel authored and simi committed Feb 11, 2016
1 parent 2797e0c commit 8d693d4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ use OmniAuth::Builder do
}
end
```

In API version 2.3 Facebook changed OAuth response format which is different from current omniauth-facebook default.
If you intend to use this or newer version (which might be a minimum allowed for your app!) you need to provide additional argument to `provider` as shown below.

```ruby
use OmniAuth::Builder do
provider :facebook, ENV['APP_ID'], ENV['APP_SECRET'],
:client_options => {
...
},
token_params: { parse: :json }
end
```
### Per-Request Options

If you want to set the `display` format, `auth_type`, or `scope` on a per-request basis, you can just pass it to the OmniAuth request phase URL, for example: `/auth/facebook?display=popup` or `/auth/facebook?scope=email`.
Expand Down

0 comments on commit 8d693d4

Please sign in to comment.