I'm developing an android application that uses the Facebook SDK in order to enable Facebook login. When a user logs in, I create a Request.newMeRequest(...) and override the onCompleted(...). In the onComplete, I want to check if the user have a property named "Hash". If not, I want to set that property and save it in my Facebook app.
@Override
public void onCompleted(GraphUser user, Response response) {
if (user != null) {
... // non relevant code.
String hash = generateRandomHash();
user.setProperty("Hash", hash);
}
}
The problem is, that the added property is saved localy in the GraphUser object, and not saved on Facebook for future access. Is there an easy way to save this data on Facebook for each user that signs into my application using Facebook?
Thank you very much! Yuval.