English 中文(简体)
• 如何使用手提书认证控制 as子。
原标题:How to use facebook authentication with asp.net login control?

我在一星期的面对面认证上进行了挖掘。 我走过许多东西,例如面纱——连接、Facebook C# SDK从《刑法》和其他与现在绝对的面纱连接的方法。 http://developers.facebook.com 多次 我确实能够有一个 log子,利用新的和标准图表APIC字眼获得用户信息。 印有 Java。

var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
var name = response.name
var username = response.username
var gender = response.gender

在另一个世界,我有Login控制和作为表格认证管理整个网站。

Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate

Dim userName As String = Login1.UserName
Dim password As String = Login1.Password
Dim result As Boolean = UserLogin(userName, password)
If (result) Then
    e.Authenticated = True
Else
    e.Authenticated = False
End If
End Sub

Private Function UserLogin(ByVal userName As String, ByVal password As String) As Boolean
    //validate user // if valid, return true
    //return false if invalid user
End

我可以从现有网站上删除所有形式认证。 应在网站上添加“Facebooklogin”的标记。 现在,我看不到的一点是......。

  1. How to authenticate the asp.net Form authentication when someone Login to the website using facebook Login.
  2. How do I pass all the value in the javascript to aspx.vb to connect to database and store the information.

我理解,我需要在数据库中设立一个新的表格,可能称为FacebookUsers。 但是,我可以想出一种办法,面对认证和作为p.netLogin控制来共同努力。 我的网址是VB。 净值。

最佳回答
  1. *How do I pass all the value in the javascript to aspx.vb to connect to database and store the information*. Check out the following articles they may help you out a bit. http://www.codeproject.com/Tips/371917/Get-user-Facebook-details-in-ASP-NET-and-Csharp

1.-Don t create a new table just add a new field to your current users table... 2.-Name the Field FaceBookUID or FB_ID. 3.-Store the facebook user id . 4.-Set the default Value of the FACEBOOK UID to 0. 5.-Now you ll have a unique value between a regular user and a FacebookUser.

问题回答

暂无回答




相关问题
Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

Hover tooltip on specific words in rich text box?

I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?

热门标签