ben*_*ben 5 facebook ruby-on-rails facebook-graph-api omniauth
当您使用OmniAuth通过Facebook登录Web应用程序时,这些是webapp具有的权限:
Access my basic information Includes name, profile picture, gender, networks, user ID, list of friends, and any other information I've shared with everyone.
Send me email WebApp may email me directly at email@email.com
Access my data any time WebApp may access my data when I'm not using the application
Run Code Online (Sandbox Code Playgroud)
而当您使用mini_fb gem将Web应用程序链接到Facebook时,这些是权限(必须将其指定为代码,否则格式化很奇怪):
Access my basic information
Includes name, profile picture, gender, networks, user ID, list of friends, and any other information I've shared with everyone.
Required
Send me email
WebApp may email me directly at email@email.com ·
Required
Access my profile information
Likes, Music, TV, Movies, Books, Quotes, About Me, Activitie...s, Interests, Groups, Events, Notes, Birthday, Hometown, Current City, Website, Religious and Political Views, Education History, Work History and Facebook StatusSee More
Required
Online Presence
Required
Access my family & relationships
Family Members and Relationship Status
Required
Access my photos and videos
Photos Uploaded by Me, Videos Uploaded by Me and Photos and Videos of Me
Required
Access my friends' information
Birthdays, Religious and Political Views, Family Members and... Relationship Statuses, Hometowns, Current Cities, Likes, Music, TV, Movies, Books, Quotes, Activities, Interests, Education History, Work History, Online Presence, Websites, Groups, Events, Notes, Photos, Videos, Photos and Videos of Them, 'About Me' Details and Facebook StatusesSee More
Required
Post to my Wall
WebApp may post status messages, notes, photos, and videos to my Wall
Access messages in my inbox
Access posts in my News Feed
Access my data any time
WebApp may access my data when I'm not using the application
Access Facebook Chat
Send me SMS messages
WebApp may send SMS messages to my phone:
Manage my events
WebApp may create and RSVP to events on my behalf
Access my custom friend lists
Access my friend requests
Insights
WebApp may access Insights data for my pages and applications
Manage my advertisements
Run Code Online (Sandbox Code Playgroud)
我目前正在使用OmniAuth,并希望继续这样做,但我的应用程序需要更多权限,就像mini_fb有一些额外的权限.有谁知道如何自定义OmniAuth以请求额外的权限?
shi*_*ara 10
您可以使用以下:scope
属性检查选项:
use OmniAuth::Strategies::Facebook, 'app_id', 'app_secret', {:scope => 'email,offline_access, your,scope,you,want'}
Run Code Online (Sandbox Code Playgroud)
检查Facebook权限文档您真正想要的范围,并通过commant on :scope
选项单独定义它.
如果你使用初始化程序来定义你的OamniOauth,那就是这样的:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, 'APP_ID', 'APP_SECRET', {:scope => 'email,offline_access, your,scope,you,want'}
end
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2520 次 |
最近记录: |