Start a new topic

Fetched user is missing data

I am fetching a user using "lookupByFacebookIDBlocking" (this is a workaround until previous question is answered) and have managed to get the user that I added. The problem is that all of the data that I put in using "user.put(KEY, VALUE)" is missing. I keep getting null values. The only data that is appearing is the username, Id, and facebook info. Here is the code snippit I use to fetch the user data:



User[] results = users.lookupByFacebookIDBlocking(iFriend.getId()).execute();

Gdx.app.log(TAG, "received "+ results[0].get(USER_NAME));//Returns null



Is the data inserted using put restricted?

Calling `put` on a `User` only updates that object locally on the client, you will have to call update to push these changes to your backend.



for example:



User[] results = users.lookupByFacebookIDBlocking(iFriend.getId()).execute();

User myUser = results[0];

myUser.put(USER_NAME, "my username!");

myJavaClient.user().updateBlocking(myUser).execute();`

Hey Ed,



I've made sure to update the user and I can see the data in the backend, but when I try to access user.get(USER_NAME), I get null but I should get "sha". I printed out the user and this is what I see:





FriendList: USER: {"_id":"54bf704b4bec78f429c03b0c","username":"b98ca1c7-6b08-441d-abe4-170457121e6c","_socialIdentity":{"facebook":{"id":"662444754"}}}



None of the data I stored with put is there even though I can see it in the backend.
Login or Signup to post a comment