Codebase list ruby-omniauth-facebook / d4b0934
add notes about passing display/state param during request url call Mark Dodwell 12 years ago
2 changed file(s) with 8 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4242 end
4343 ```
4444
45 *NB.* If you want to set the `display` format on a per-request basis, you can just pass it to the OmniAuth request phase URL, for example: `/auth/facebook?display=popup`.
45 *NB.* If you want to set the `display` format on a per-request basis, you can just pass it to the OmniAuth request phase URL, for example: `/auth/facebook?display=popup`. You can also pass through a `state` param which will be passed along to the callback url.
4646
4747 ## Authentication Hash
4848
8484 options.access_token_options.inject({}) { |h,(k,v)| h[k.to_sym] = v; h }
8585 end
8686
87 ##
88 # You can pass +display+ or +state+ params to the auth request, if
89 # you need to set them dynamically. You can also set these options
90 # in the OmniAuth config :authorize_params option.
91 #
92 # /auth/facebook?display=popup&state=ABC
93 #
8794 def authorize_params
8895 super.tap do |params|
8996 params.merge!(:display => request.params['display']) if request.params['display']