有很多帖子关于“/ me”返回undefined,但我找不到任何解决方案。
用户已登录,因为已连接response.status。但是调用/ me会返回“undefined”。
代码段:
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);
});