有很多关于“/me”返回未定义的帖子,但我找不到任何解决方案。
用户已登录,因为 response.status 已连接。但是调用 /me 返回“未定义”。
代码片段:
if (response.status === 'connected') {
// The response object is returned with a status field that lets the app know the current
// login status of the person. In this case, we're handling the situation where they
// have logged in to the app.
FB.api('/me', function(info) {
alert("facebook:"+info.id);
});