Codigami / face4j

face4j is a java library for facebook's new graph API

Home Page:http://face4j.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getCurrentUser() throw Exception on first load?

henryhks opened this issue · comments

I found that when I deploy my project on tomcat
The following exception is thrown in the FIRST time I call getCurrentUser() with a valid access token:

......
OAuthAccessToken fbaccessToken = new OAuthAccessToken(accessToken);
Facebook facebook = new Facebook(fbaccessToken);
User user = facebook.getCurrentUser();
......

java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Properties.java:435)
at java.util.Properties.load0(Properties.java:354)
at java.util.Properties.load(Properties.java:342)
at com.face4j.facebook.http.APICaller.getHttpClient(APICaller.java:56)
at com.face4j.facebook.http.APICaller.getData(APICaller.java:115)
at com.face4j.facebook.Facebook.pullData(Facebook.java:991)
at com.face4j.facebook.Facebook.getUser(Facebook.java:87)
at com.face4j.facebook.Facebook.getCurrentUser(Facebook.java:75)

But in the SECOND time the exception will not be thrown

Does it happen all the time? You mean every time you restart your server you get that exception?