【问题标题】:hybridauth: Invalid Scopes: read_streamhybridauth:无效范围:read_stream
【发布时间】:2016-04-12 05:01:23
【问题描述】:

当我使用下面的代码时,当我使用 hybridauth-2.5.1 时,我不断从 Facebook 获得这个。

无效范围:read_stream。此消息仅向开发人员显示。您的应用程序的用户将忽略这些权限(如果存在)。请阅读文档以获取有效权限:https://developers.facebook.com/docs/facebook-login/permissions

$config   = dirname(__FILE__) . '/config.php';
require_once( "Hybrid/Auth.php" );


$hybridauth = new Hybrid_Auth( $config );

// try to authenticate with Facebook
$adapter = $hybridauth->authenticate( "Facebook" );

// return Hybrid_User_Profile object intance
 $user_profile = $adapter->getUserProfile();

 echo "Hi there! " . $user_profile->displayName;

【问题讨论】:

  • 只使用谷歌,该权限已经消失多年。错误信息应该很清楚,权限不存在。

标签: facebook hybridauth


【解决方案1】:

如果有人遇到同样的问题,这就是解决方案

"Facebook" => array(
                "enabled" => true,
                "keys" => array("id" => "162293657470362", "secret" =>
               "109552243da7661c3a1c7bb90670c858"),
                "scope"   => "email, user_about_me, user_birthday, user_hometown",
                "trustForwarded" => false

            )

【讨论】:

    猜你喜欢
    • 2016-04-08
    • 2015-07-17
    • 2020-12-16
    • 2019-06-18
    • 1970-01-01
    • 2021-03-29
    • 2018-12-06
    • 1970-01-01
    • 2015-10-08
    相关资源
    最近更新 更多