2014-12-05 54 views

回答

0

您可以将字段请求参数发送到me调用。它将根据需要返回响应中的用户名。

FB.api('/me?fields=email,username,first_name,last_name', function(response) { 
    console.log(response.username); 
}) 
+0

Btw Facebook打算并已经从Tobi所说的响应中删除了用户名。相关评论http://stackoverflow.com/questions/23663126/facebook-api-me-not-returning-username#comment-36355537但我仍然在我的应用程序可能使用旧的API。 – Vishwanath 2014-12-05 10:51:43

相关问题