未根据请求授予 Facebook 权限
Facebook Permission not being granted with request
在获得所有许可的情况下通过 Facebook 将用户注册到应用程序。但在注册期间未请求权限。
下面是步骤
已添加 java 脚本调用 Facebook 登录 window 权限。
(function($) {
window.fbAsyncInit = function() {
FB.init({
appId: '#{settings.facebookAppId}',
status: true,
cookie: true,
xfbml: true,
oauth: true
});
};
var fbPermissions ="user_about_me,user_activities,user_birthday,user_checkins,user_education_history,user_events,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_questions,user_relationships,user_relationship_details,user_religion_politics,user_status,user_videos,user_website,user_work_history,email,read_friendlists,read_mailbox,read_requests,read_stream,xmpp_login,manage_friendlists,manage_notifications,user_online_presence,friends_online_presence,publish_stream";
$(document).on('click', '.linkAccount', function(){
FB.login(function(res) {
var authToken =res.authResponse.accessToken;
var auth = res.authResponse;
}, { scope: fbPermissions });
});
- 已显示 Facebook 登录 window
- 用户将被请求权限为 "will receive the following info: your public profile and email address"。
- 此处只要求提供电子邮件地址和个人资料的权限。
没有请求其他范围的权限,例如 read_mailbox ...因此我们在调用 FQL 查询时遇到错误。
SELECT thread_id, body, viewer_id, message_id, source, author_id, created_time FROM message WHERE thread_id IN (SELECT thread_id FROM thread WHERE folder_id = 1) AND created_time < " + daybeforenow + " ORDER BY created_time DESC"
获取错误为
{"Requires extended permission: read_mailbox","type":"OAuthException","code":298 }
在用户 facebook app/settings 中,仅显示电子邮件地址、个人资料的批准列表。
正在尝试修复这个 issue.no 运气。社区帮助将不胜感激。
您正在请求大量权限...其中一些已不存在,其中一些永远不会获得 Facebook 的批准。只有当你真的知道你需要它时才请求许可。顺便说一句,FQL 已被弃用,你不应该再使用它,它不会在较新的应用程序中工作。
关于一般权限,您应该阅读有关登录审查的 Facebook 文档:https://developers.facebook.com/docs/facebook-login/review/what-is-login-review
权限很可能不起作用,因为您没有尝试使用应用 Admin/Developer/Tester 并且它们未获批准。
在获得所有许可的情况下通过 Facebook 将用户注册到应用程序。但在注册期间未请求权限。
下面是步骤
已添加 java 脚本调用 Facebook 登录 window 权限。
(function($) { window.fbAsyncInit = function() { FB.init({ appId: '#{settings.facebookAppId}', status: true, cookie: true, xfbml: true, oauth: true }); }; var fbPermissions ="user_about_me,user_activities,user_birthday,user_checkins,user_education_history,user_events,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_questions,user_relationships,user_relationship_details,user_religion_politics,user_status,user_videos,user_website,user_work_history,email,read_friendlists,read_mailbox,read_requests,read_stream,xmpp_login,manage_friendlists,manage_notifications,user_online_presence,friends_online_presence,publish_stream"; $(document).on('click', '.linkAccount', function(){ FB.login(function(res) { var authToken =res.authResponse.accessToken; var auth = res.authResponse; }, { scope: fbPermissions }); });
- 已显示 Facebook 登录 window
- 用户将被请求权限为 "will receive the following info: your public profile and email address"。
- 此处只要求提供电子邮件地址和个人资料的权限。
没有请求其他范围的权限,例如 read_mailbox ...因此我们在调用 FQL 查询时遇到错误。
SELECT thread_id, body, viewer_id, message_id, source, author_id, created_time FROM message WHERE thread_id IN (SELECT thread_id FROM thread WHERE folder_id = 1) AND created_time < " + daybeforenow + " ORDER BY created_time DESC"
获取错误为 {"Requires extended permission: read_mailbox","type":"OAuthException","code":298 }
在用户 facebook app/settings 中,仅显示电子邮件地址、个人资料的批准列表。
正在尝试修复这个 issue.no 运气。社区帮助将不胜感激。
您正在请求大量权限...其中一些已不存在,其中一些永远不会获得 Facebook 的批准。只有当你真的知道你需要它时才请求许可。顺便说一句,FQL 已被弃用,你不应该再使用它,它不会在较新的应用程序中工作。
关于一般权限,您应该阅读有关登录审查的 Facebook 文档:https://developers.facebook.com/docs/facebook-login/review/what-is-login-review
权限很可能不起作用,因为您没有尝试使用应用 Admin/Developer/Tester 并且它们未获批准。