缺少“名字”在某些用户的用户个人资料中

发布于 2024-12-21 13:16:14 字数 661 浏览 1 评论 0原文

鉴于此代码:

$user_profile = $facebook->api('/me');
echo $user_profile['name'];

我看到某些用户出现以下错误:

PHP Notice:  Undefined index: name

在什么情况下,名称会丢失?

更新:对于我没有名字的所有用户来说,一个共同点是他们的个人资料“链接”不起作用。当我访问它们时,我收到一个包含以下错误消息的页面:

The page you requested was not found.
You may have clicked an expired link or mistyped the address. Some web addresses are case sensitive.
Return home
Go back to the previous page

此错误报告: http://developers.facebook.com/bugs/329979473681183

Given this code:

$user_profile = $facebook->api('/me');
echo $user_profile['name'];

I see the following error for some users:

PHP Notice:  Undefined index: name

Under what conditions, would the name be missing?

UPDATE: Something common with all the users for whom I do not have a name is that their profile "link" does not work. I get a page with the following error msg when I visit them:

The page you requested was not found.
You may have clicked an expired link or mistyped the address. Some web addresses are case sensitive.
Return home
Go back to the previous page

Bug report for this:
http://developers.facebook.com/bugs/329979473681183

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

残龙傲雪 2024-12-28 13:16:14

事实证明,这些是企业帐户,并且它们没有可以可以通过 API 检索。

So it turns out that these were business accounts and they don't have names which can be retrieved via the API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文