I've been trying to get some informations from my Friends throught facebook4j. But every time I try to do it I receive only null pointers (except on id/name). Here's the code:
` Stalker(String victimUsername, String yourUsername,boolean isFriend) {
try {
friendList = facebook.getFriends(yourUsername);
if(isFriend){
int index = friendList.indexOf(facebook.getUser(victimUsername));
victimUser = friendList.get(index);
println(victimUser);
}
else
victimUser = facebook.getUser(victimUsername);
try {
birthdayVictimDate.setTime(df.parse(victimUser.getBirthday()));
}
catch(ParseException e) {
e.printStackTrace();
}
victimProfilePic = loadImage(facebook.getPictureURL(victimUsername).toString());
}
catch(FacebookException e) {
e.printStackTrace();
}
} `
As you can see:
FriendJSONImpl extends UserJSONImpl [id=733939867, name=Tamires Ribeiro, firstName=null, middleName=null, lastName=null, gender=null, locale=null, languages=[], link=null, username=null, thirdPartyId=null, timezone=null, updatedTime=null, verified=null, bio=null, birthday=null, cover=null, education=[], email=null, hometown=null, interestedIn=[], location=null, political=null, favoriteAthletes=[], favoriteTeams=[], picture=null, quotes=null, relationshipStatus=null, religion=null, significantOther=null, videoUploadLimits=null, website=null, work=[]]
If the user isn't a friend of mine I can acess some of those informations, and I get this:
UserJSONImpl [id=733939867, name=Tamires Ribeiro, firstName=Tamires, middleName=null, lastName=Ribeiro, gender=female, locale=pt_BR, languages=[], link=https://www.facebook.com/tamiresribeirodias, username=tamiresribeirodias, thirdPartyId=null, timezone=null, updatedTime=Sat Oct 26 21:20:17 BRST 2013, verified=null, bio=null, birthday=05/13, cover=null, education=[EducationJSONImpl [year=null, type=College, school=IdNameEntityJSONImpl [name=Federal University of Rio de Janeiro, id=109442119074280], degree=null, concentration=[], classes=[], with=[]]], email=null, hometown=null, interestedIn=[], location=null, political=null, favoriteAthletes=[], favoriteTeams=[IdNameEntityJSONImpl [name=Vegetarianos Pensam Melhor, id=240337606020973], IdNameEntityJSONImpl [name=Fluminense Football Club, id=159225040801899]], picture=null, quotes=null, relationshipStatus=In a relationship, religion=null, significantOther=IdNameEntityJSONImpl [name=Pedro Gabriel Lancelloti Pinto, id=100000337547270], videoUploadLimits=null, website=null, work=[]]
As you can see, I can get lot of more informations directly trought facebook wich is confusing because as friend I should get the same or more infomartion.
Does anybody knows why this happen and how it could be solved? PS: at my app I set on permissions "friends_birthday" and set it also at my user_token.