当我使用下面的代码时,当我使用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;
答案 0 :(得分:1)
如果有人有同样的问题,这就是解决方案
"Facebook" => array(
"enabled" => true,
"keys" => array("id" => "162293657470362", "secret" =>
"109552243da7661c3a1c7bb90670c858"),
"scope" => "email, user_about_me, user_birthday, user_hometown",
"trustForwarded" => false
)