无法获得扩展权限.. :( 喜欢电子邮件

问题描述 投票:0回答:1

嗨,我设置了一个如下所示的新闻 facebook 应用程序,但是当我调用身份验证对话框时,没有请求电子邮件,所以我没有得到任何信息..

http://hpics.li/b91d453

任何想法?

我的面子书要求:

$data['get'] = array(
    'access_token'  => $access_token,
    'locale' => 'fr_FR',
    'req_perms' => 'email,user_about_me,user_birthday,user_location,publish_actions',
    'ext_perms' => 'publish_stream',
    'fields' => 'email,name,picture,first_name,last_name,gender,link,birthday,email,location'
);

PermissionDialog 不包含电子邮件和 req_prems.. 为什么? 而且预览当前对话框也不同于预览推荐对话框(包含电子邮件等)。 有什么想法吗?

php jquery facebook facebook-graph-api
1个回答
0
投票

您使用的是哪个文档? 2011 年 10 月需要传递给 Auth 对话框以请求额外权限的参数更改为“scope”

有关权限信息,请参阅https://developers.facebook.com/docs/authentication/permissions/,有关如何进行身份验证,请参阅https://developers.facebook.com/docs/authentication/

如果您正在进行服务器端身份验证,则将用户重定向到的 URL 是:

https://www.facebook.com/dialog/oauth/?
    client_id=YOUR_APP_ID
    &redirect_uri=YOUR_REDIRECT_URL
    &state=YOUR_STATE_VALUE
    &scope=COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES

然后您使用 oauth 端点交换令牌代码(所有这些都包含在上面的文档中) - 您的服务器使用以下参数发出请求:

https://graph.facebook.com/oauth/access_token?
    client_id=YOUR_APP_ID
   &redirect_uri=YOUR_REDIRECT_URI
   &client_secret=YOUR_APP_SECRET
   &code=CODE_GENERATED_BY_FACEBOOK_AND_SENT_TO_YOUR_APP_IN_EARLIER_STEP
© www.soinside.com 2019 - 2024. All rights reserved.