I'm developing an ASP.Net web. The page has a facebook login-button and i want when the user clicks on the button and gets logged in, call a C# function to show some elements of my page.
I had created a facebook app and in the code from the page i put the facebook SDK login, but didn't work...
Anyone can help me please?
Thanks!!
What you would want to do is call a webservice on successful login
FB.Event.subscribe('auth.authResponseChange', function (response) {
if (response.status === 'connected') {
// log in successful
callWebService();
}
else if (response.status === 'not_authorized') {
// the user is logged in to Facebook,
// but has not authenticated your app
}
else {
// the user isn't logged in to Facebook.
}
});
And then you can do/manipulate whatever you want in the webservice and success callback of the webservice!
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.