簡體   English   中英

使用C#ASPX登錄Facebook

[英]Login Facebook using C# ASPX

我正在嘗試使用aspx登錄Facebook,但我無法從Facebook插件登錄電子郵件,所以任何人都有一個樣本。

所有我想要變量的電子郵件。

你需要的是這里

我創建了這段代碼。 希望它會對你有所幫助; 它適用於我,它登錄后收到電子郵件。

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

腳本代碼是:

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'});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM