开发者

Login Facebook using C# ASPX

I'm trying to log in to Facebook using aspx but i can't get the email from Facebook plugin log in so 开发者_StackOverflowany one have a sample for that.

all i want to get the email in variable.


What you need is here


I have created this code. Hopefully it will help you; it works for me and it gets the e-mail after login.

<fb:login-button autologoutlink="true" perms="email,user_birthday,status_update,publish_stream"></fb:login-button>

Script code is:

FB.login(function(response) {
    if (response.authResponse) {
        console.log('Welcome!  Fetching your information.... ');

        FB.api('/me', function(response) {
            alert(response.email);
        });

        FB.logout(function(response) {
            console.log('Logged out.');
        });
    });
    } else {
        console.log('User cancelled login or did not fully authorize.');
    }
}, {scope: 'email'});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜