java - How to take a redirection URL -


I have a problem with redirection, in my work I will have to create a connection from that URL which will automatically be replaced by any other URL Go to this point it takes this credential (username and password) and redirects to that URL that contains the parameter that I want, how can I take this parameter?

To be precise, I have to:

URL with your client_id embed and type user set Please. Since your app is embedding a small window, you can trigger the compact "popup" version of the authorization dialog with display parameters:

  graph.facebook.com/oauth/ Authorize? Client_id = ... & amp; Redirect_uri = www.facebook.com / connect / login_success.html & amp; Type = USER_AGENT & amp; Display = popup  

After authorizing your application, we redirect the user back to the Access token at www.facebook.com/connect/login_success.html Do the URL fragment: www.facebook.com/connect/login_success.html#access_token = ... and. Expires_in = ... Prevent the above redirect and access the access token from the URL. Use the access token to get data from the graph API on behalf of the user: graph.facebook.com/me?access_token = ... .

I access_token .

You can use it to do this, it will automatically follow redirects

  HTTP Client Client = New HTTP Client (); GetGethod Get = New GetMethod ("graph.facebook.com/oauth/authorize?client_id= ... and amp; redirect_uri = www.facebook.com / connect / login_success.html & amp; type = user_agent and display = popup" ); Int status = client.exectueMethod (get);  

Then you will have the necessary information in the location header of that information that you can get by using:

  string location = get. GetResponseHeader ("location") getValue () .;  

and parse the place-header for the desired URL fragment.

Hope


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -