Answer the question
In order to leave comments, you need to log in
How to get text after # character when receiving request via HttpListener?
I'm sending an authorization request through a third party library to dropbox. Upon clicking a button in the browser, dropbox requests a redirect_uri that my app is listening on. The format is as follows
[REDIRECT_URI]#access_token=ABCDEFG&token_type=bearer&uid=12345&state=[STATE]
Answer the question
In order to leave comments, you need to log in
char[] separators = { '=', '&' };
string[] responseContent = responseString.Split(separators);
string accessToken = responseContent[1];
int userId = Int32.Parse(responseContent[5]);
MessageDialog dialogSuccess = new MessageDialog("access_token = "+accessToken+ "\nuser_id = "+userId);
dialogSuccess.ShowAsync();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question