Sign In Register

How can we help you today?

Start a new topic
Answered

Response Api

Hi,


Im trying to customize a piece of code from unity tutorials. Involving the response api.


public void UpdateInformation()
	{
		//We send an AccountDetailsRequest
		new AccountDetailsRequest().Send((response) =>
		                                 {
			//We pass the details we want from our response to the function which will update our information
			UpdateGUI(response.DisplayName.UserId);
		});
	}

and i keep receiving an error in unity regarding the user id. 


a point in the right direction on how to implement the response feature would be nice to there are no available examples. And the documentation has the Name:Type entries with a starting lowercase while in unity it requires Uppercase, it would be nice to fix or point a heads-up to users.


Thnx


Cheers,


Best Answer

Hi,


I believe the correct way to get the user Id is to use response.UserId and for the display name use response.DisplayName.


If you are using an IDE with autocomplete you can type in response, then the period key which gives you response. and it should give you a list of variables to select from.


Shane

1 Comment

Answer

Hi,


I believe the correct way to get the user Id is to use response.UserId and for the display name use response.DisplayName.


If you are using an IDE with autocomplete you can type in response, then the period key which gives you response. and it should give you a list of variables to select from.


Shane

Login to post a comment