Hi Team,
I am having problem with updateing profile in Unity. I am sending a call for updating the profile using below code:
//This method gets called from button click, which sends a call for updating the profile
public void DoneEditing ()
{
userService = sp.BuildUserService (); // Initializing UserService.
User currentUser = userService.GetUser (GameInfo.info.userName); //getting the current user
if (currentUser == null) //if no user is found on the system
return;
User.Profile profileObj = (User.Profile)currentUser.GetProfile (); //Creating object for user profile
profileObj.SetCountry (country.text); //Setting user's country
//selecting gender
if (male != null) {
if (male.isOn) {
profileObj.SetSex (UserGender.MALE);
} else if (female.isOn) {
profileObj.SetSex (UserGender.FEMALE);
}
}
//updating the user profile in the server
userService.CreateOrUpdateProfile (currentUser, new EditProfileResponse ());
}
First time its getting update with "Country" and "Gender" and I can see in shephertz server. But next time when I am trying to update again, its show below exception:
Exception : com.shephertz.app42.paas.sdk.csharp.App42BadParameterException: {"httpErrorCode":400, "appErrorCode":1400, "message":"Bad Request", "details":"The Request parameters are invalid"}
Please help me.
Thanks,
Somnath Chowdhury.