我正在使用Facebook4j,当我第一次尝试连接我的facebook帐户时,我现在有:
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: message - (#100)
Tried accessing nonexisting field (user_photos) on node type (User)\ncode - 100\
我不知道为什么但是我没有使用user_photos这很奇怪..
我这样做
FacebookUtility facebookUtility = new FacebookUtility();
User userFb = facebookUtility.getFacebookUser(String.valueOf(idFb));
我的函数getFacebookUser是:
public facebook4j.User getFacebookUser(String userId) throws FacebookException{
// Instanciate Facebook4j Facebook object to request Facebook Graph API
Facebook facebook = setFacebookConnector();
// Construct Facebook4j Reading object to define Facebook Graph API reading options
Reading reading = setFacebookReading();
// Instanciate Facebook4j User object to store user information
User userFb = facebook.getUser(userId, reading);
return userFb;
}