当我用java脚本SDK加载他们的相册时,我遇到了几个facebook用户的问题。我使用此权限'user_friends,friends_photos'和此代码:
$scope.getAlbums = function(id) {
FB.api("/"+id+"/albums?limit=1000", function(response) {
if (response && !response.error) {
var responseDataLength = response.data.length;
var albums = [];
if(response.data.length > 0){
for (var i = response.data.length - 1; i >= 0; i--) {
if (typeof response.data[i].cover_photo != "undefined") {
url = "https://graph.facebook.com/"+response.data[i].cover_photo+"/picture?type=thumbnail&access_token="+ $scope.persone_me.facebook_token;
}
id = response.data[i].id;
name = response.data[i].name;
albums.push({
url : url,
id : id,
name : name
});
};
} else{
FB.api("/"+id+"/picture?height=600&redirect=false", function(response) {
console.log(response);
});
}
// Apply changes to albums
$scope.$apply(function(){
$scope.albums = albums;
});
}
});
}
这个用户唯一常见的事情是更短的fb id(9位数)......我不知道这是不是巧合......