重点是获取用户好友列表,这样我就可以获得他们的screen_name
和profile_img
,但我似乎做不到。
function getUserInfo() {
log("Obter informação de "+username);
rede.get('/1.1/users/search.json?count=1&q='+encodeURIComponent(username)).done(processUserInfo).fail(logError("procurar utilizador"));
}
function processUserInfo(response) {
username=response[0].screen_name;
var foto=response[0].profile_image_url;
$('#tabela').append('<p>'+username+'</p>');
$('#tabela').append('<img src='+foto+'>');
$('#load').hide();
}
function getUserFriends(response) {
log("...");
rede.get('/1.1/friends/list.json?cursor={0}&screen_name={1}&count=200&q='+encodeURIComponent(username).done(processUserInfo));
}
function processUserFriends(response) {
log("...");
updateTable();
}