protected void ConnectToFaceBook_btn_Click(object sender, EventArgs e)
{
string url = System.Uri.EscapeDataString("http://localhost:1298/FacebookChatApi/Default2.aspx");
string clientID = "507061112747022";
string redirecturl = @"https://graph.facebook.com/oauth/authorize?client_id="+clientID+"&redirect_uri="+url;
Response.Redirect(redirecturl);
GetAccessToken();
}
As you can see I am calling GetAccessToken()
after Response.Redirect
the given URL will return a query string called code and GetAccessToken. I am reading this query string but as I am doing it everything after Response.Redirect is not being executed. Is there any work around to call the redirecturl and get the code value without using Response.redirect?