开发者

Devise + Omniauth for Facebook Connect - How to use a dialog for permissions

currently with rails 3 + devise + omniauth for facebook connect, when you send the user to Facebook to click "Allow" the following url type is generated:

https://www.facebook.com/connect/uiserver.php?app_id=XXXXXXXX&method=permissions.request&display=page&next=XXXXXX&response_type=code&fbconnect=1&perms=email

The problem is that is for a full window view and I want to show this dialog in a popup dialog like seen on Blekko where the URL looks like:

https://www.facebook.com/dialog/permissions.request?api_key=169076986451072&app_id=169076986451072&display=popup&fbconnect=1&locale=en_US&next=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Dfb26db118%26origin%3Dhttps%253A%252F%252Fblekko.com%252Ff3c37c9a24%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df81d7582%26result%3D%2522xxRESULTTOKENxx%2522&perms=offline_access%2Cuser_likes%2Cuser_location%2Cfriends_likes开发者_开发技巧%2Cfriends_location%2Cuser_checkins%2Cfriends_checkins%2Cpublish_stream%2Cread_stream&return_session=1&sdk=joey&session_version=3

Any idea on how I can get the dialog url with omniauth? Thanks


You can configure this in the devise initializer:

config.omniauth :facebook, APP_ID, APP_SECRET, { :display => 'popup' }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜