In one of the website I need login with facebook account. I am using following code on face book login button.
string callbackUrl = "https://www.facebook.com/connect/login_success.html";
Response.Redirect(string.Format("https://graph.facebook.com/oauth/" +
"authorize?client_id={0}&redirect_uri={1}&scope=offline_access," +
"publish_stream,read_stream,publish_actions,manage_pages",
1448xxxxxx781763, callbackUrl));
it shows 'Success' with access token url for a brief moment and then a security message appears and the access token is lost. How can I capture the access token? Thanks
Use your own domain for the callbackURL, not facebook.com.
That being said, you are better off by using the JavaScript SDK for login: https://developers.facebook.com/docs/reference/javascript/FB.login/v2.0
That way you don´t have to worry about the Access Token at all.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.