function getUser()
{
FB.api('/me', function(response) {
console.log('Response is '+response);
alert('Your name is ' + response.first_name);
alert('Your last name is ' + response.last_name);
alert('Your Gender is ' + response.gender);
alert('Your status is '+response.username);
}
我怎样才能得到像下面这样打印的整个响应?
{
"id": "blah blah",
"name": "blah blah",
"first_name": "blah blah",
"last_name": "blah blah",
"link": "https://www.facebook.com/blah blah",
"username": "blah blah",
"hometown": {
"id": "106442706060302",
"name": "Pune, Maharashtra"
},
"location": {
"id": "106377336067638",
"name": "Bangalore, India"
},
"bio": "╔══╗♫ ♪♫\n║██║\n║¨o•♫\n╚═|̲̅̅●̲̅̅|̅lιlllι ♫ I LoVe MuZiK!!\n\n█║▌│█│║▌║│█║▌│║\n® Copyright © 2012 ™\n█║▌│█│║▌║│█║▌│║\n\nReVoLt",
"gender": "male",
"relationship_status": "Single",
"timezone": 5.5,
"locale": "en_GB",
"verified": true,
"updated_time": "2012-06-15T05:33:31+0000",
"type": "user"
}
同样通过 respose.name 获取用户名。如何在参数位置中获取位置,因为它是 JSON 数组?