hybridauth:无效的范围:read_stream

时间:2016-01-07 17:19:37

标签: facebook hybridauth

当我使用下面的代码时,当我使用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;

1 个答案:

答案 0 :(得分:1)

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

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

            )