当我试图运行此代码时:
ParseQuery<ParseUser> query = ParseQuery.getQuery("User");
query.getInBackground(FbLogin.userObjId, new GetCallback<ParseUser>() {
public void done(ParseUser object, ParseException e) {
if (e == null) {
...
} else {
Log.e("tag", "Error: " + e.getMessage());
}
}
});
&#34; FbLogin.userObjId&#34;是解析用户ID:
userObjId = (String) user.get("objectId");
好吧,当我尝试运行此代码时,我收到了此消息:
11-27 13:48:32.827: E/tag(27174): Error: no results found for query
我需要做些什么来解决它?
答案 0 :(得分:1)
而不是:
userObjId = (String) user.get("objectId");
我写道:
userObjId = ParseUser.getCurrentUser().getObjectId();