carriles OmniAuth facebook extendido el permiso
-
28-09-2019 - |
Pregunta
He leído la rdoc oauth OmniAuth
@consumer = OAuth::Consumer.new(key, secret, {
:site => "http://term.ie",
:scheme => :header,
:http_method => :post,
:request_token_path => "/oauth/example/request_token.php",
:access_token_path => "/oauth/example/access_token.php",
:authorize_path => "/oauth/example/authorize.php"
})
no hay margen como
https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/callback&
scope=user_photos,user_videos,publish_stream
¿Cómo puedo añadir uno? Estoy tratando de oauth sobreescritura ahora ... hacer alguien tiene alguna solución mejor?
Solución
Ponga esto en inicializador
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook , 'app' , 'secret' , {:scope => "manage_pages"}
end
Si está utilizando más de un ámbito, es delimitado por comas:
:scope => "offline_access, manage_pages"
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow