Ruby on rails rails omniauth facebook扩展权限
我读过omniauth oauth rdocRuby on rails rails omniauth facebook扩展权限,ruby-on-rails,oauth,facebook-graph-api,oauth-ruby,omniauth,Ruby On Rails,Oauth,Facebook Graph Api,Oauth Ruby,Omniauth,我读过omniauth oauth rdoc @consumer = OAuth::Consumer.new(key, secret, { :site => "http://term.ie", :scheme => :header, :http_method => :post, :request_token_path => "/oauth/example/request_
@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"
})
没有这样的范围
https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/callback&
scope=user_photos,user_videos,publish_stream
如何添加一个?我现在正试图覆盖oauth。。。有谁有更好的解决方案吗?把这个放在初始化器中
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook , 'app' , 'secret' , {:scope => "manage_pages"}
end
如果使用多个作用域,则该作用域以逗号分隔:
:scope => "offline_access, manage_pages"
如果要使用多个:scope,请使用逗号分隔的字符串::scope=>“脱机访问,管理页面”文档进行提供程序设置。此处:此处列出的可用权限/作用域: