huuanh1987 / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

FriendsAreFriendsResponse isAreFriends NPE when data is hidden from this user or the API #174

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a FacebookJaxbRestClient
2. FriendsAreFriendsResponse response =
friends_areFriends(client.users_getLoggedInUser(), otherUID) where otherUID
is the UID of someone who has restricted privacy settings on facebook or
disabled the application platform entirely
3. response.getFriendInfo().get(0).isAreFriends() produces a null pointer
exception.  Inspection indicates that firendInfo.elementData[0].areFriends
= null.

What is the expected output? What do you see instead?
I expect to receive a "false" or throw an exception, as otherUID cannot be
queried.  Instead there is a NPE internal to the facebook-java-api code.

What version of the product are you using? On what operating system?
2.0.5 on Tomcat for Windows.

Please provide any additional information below.
I don't know what the library's desired functionality is when this sort of
thing happens.  (Many API calls return this kind of information when the
person being queried has disabled the platform API)

Original issue reported on code.google.com by esperte...@gmail.com on 2 Mar 2009 at 8:06

GoogleCodeExporter commented 8 years ago
Have you got a good example UID of someone who has disabled the application 
platform
or restricted privacy settings? I wonder if facebook could provide us with a 
test
user? In the meantime we can just pick a good candidate and use them to write a 
JUnit
test to show the failure.

Original comment by david.j....@googlemail.com on 7 Mar 2009 at 3:30

GoogleCodeExporter commented 8 years ago
It might be harder to recreate without being friends with the person first.  Try
209918, or create a dev account and have them disable the Facebook Platform.

Original comment by esperte...@gmail.com on 7 Mar 2009 at 5:17

GoogleCodeExporter commented 8 years ago
Perhaps we need a couple of dev accounts to run the JUnit tests under. One to 
run the
tests and another as a "friend" with the platform disabled. This would be the 
only
real way to have the JUnit test repeatable.

In the meantime, who is 209918? Please ask the owner of this account to send a 
friend
request to me "David Boden". I don't have time to configure a dev account for 
this
myself, unfortunately.

Original comment by david.j....@googlemail.com on 20 Mar 2009 at 9:29