ASP.NET Server-side Flow Authentication and getting access token
I need some help here. I'm trying do come up with a server-side flow authentication with the below code (it is a ASP.NET button)
protected void ServerSide_Click(object sender, EventArgs e)
{
Response.Redirect(
"https://www.facebook.com/dialog/oauth?client_id=***************&redirect_uri=MYURI&scope=email,offline_access,&response_type=token"
);
}
However, when the button is clicked, and the user click on Allow button after sign in to Facebook, the browser URL path on the Address bar shows something like the below:-
http://MYURL#access_token=***************%7Cd4aa713668298c84a9f74c19.1-***************%7C295Xjb6r-PvLc_l-rKOJ-Lbk5gI&expires_in=0
How do I get something like th开发者_C百科e below in order for my server to post back to facebook with my app secret?
http://YOUR_URL?code=A_CODE_GENERATED_BY_SERVER
What should I do?
Remove the response_type=token
from the URL. That is used for client side flow.
精彩评论