0

我有一个使用 scope=email、publish_actions、publish_stream 的应用程序,因此它授权获取用户电子邮件以及其他详细信息。

问题是我无法以任何方式检索它,无论我使用什么代码......我已经坚持了 4 个多小时。PHP SDK 是 3.2.2 版本,但它附带的示例不起作用。请记住,我去年(2012 年 4 月)制作的应用程序也不起作用。Graph Api 的使用有什么变化吗?


这是来自 example.php 也不起作用

// 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']不返回任何东西......

4

0 回答 0