我有一个使用scope = email,publish_actions,publish_stream的应用程序,因此它授权用户收到电子邮件,以及其他详细信息。
问题是,无论我使用什么代码,我都无法以任何方式检索它...我已经坚持了4个多小时。 PHP SDK是3.2.2版本,但它附带的示例不起作用。请记住,我去年(2012年4月)制作的应用程序也不起作用。 Graph Api的使用有什么变化吗?
// Get User ID
$user = $facebook->getUser();
// We may or may not have this data based on whether the user is logged in.
//
// If we have a $user id here, it means we know the user is logged into
// Facebook, but we don't know if the access token is valid. An access
// token is invalid if the user logged out of Facebook.
if ($user) {
try {
// Proceed knowing you have a logged in user who's authenticated.
$user_profile = $facebook->api('/me');
$user_profile['name']
和$user_profile['email']
不会返回任何内容......