How can I specifiy what access I need from my user's Facebook accounts when using OmniAuth?

前端 未结 2 1867
滥情空心
滥情空心 2021-02-10 10:48

When you use OmniAuth to login to a web app through Facebook, these are the permissions the webapp has:

Access my basic information Includes name, profile pictu         


        
2条回答
  •  轮回少年
    2021-02-10 11:08

    If you are using devise (like me) the easiest solution is to have both 'devise' and 'omniauth-facebook' in your Gemfile. Then in your devise initializer you can just add:

    config.omniauth :facebook, "app", "secret", :scope => "user_photos"
    

    This does the trick pretty well. Adding the omniauth initializer with devise set-up

提交回复
热议问题