I tried to add more than one twitter and facebook accounts from my page via omniauth in rails.
Twitter working fine using force_login
parameter.
But, facebook not supporting this.
i can add only one facebook account using /auth/facebook
. After i tried to add new facebook account using /auth/facebook
path then it returns to my home page only.
If i browse www.facebook.com in same browser then the login page not appearing. The lastly added facebook account page is opening.
when i logout from facebook in browser then i tried /auth/facebook
path. its working fine.
So, need to logout already opened facebook accounts in browser tabs, before i hit add facebook link in my page.
Can anyone help? thanks.
by deafult, you cannot log in multiple facebook account within one browser unless you have a method to trigger browser(like private browsing-mozilla, incognito Window-chrome ) to let your user sign in. websites uses cookies to track their status.
however, facebook do provide auth_type=reauthenticate. which the doc is here. https://developers.facebook.com/docs/howtos/login/client-side-re-auth/
Any correct me if im wrong.
watch this screencast it has the soultion
http://railscasts.com/episodes/360-facebook-authentication
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With