none
facebook login olma RRS feed

  • Genel Tartışma

  • Merhabalar facebook login yapıyorum ancak hata alıyorum kodlar şöyle

    Imports System.Data.SqlClient
    Imports System.Data
    Imports System.Collections.Generic
    Imports System.Web
    Imports System.Web.Script.Serialization
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports ASPSnippets.FaceBookAPI
    
    
        Protected Sub Page_Load(sender As Object, e As EventArgs)
    
            If Session("kontrol") = Nothing Then
              
            Else
                Response.Redirect("Default.aspx")
            End If
    
            FaceBookConnect.API_Key = "805648642878808"
            FaceBookConnect.API_Secret = "apisecretburada"
            If Not IsPostBack Then
                If Request.QueryString("error") = "access_denied" Then
                    ClientScript.RegisterStartupScript(Me.[GetType](), "alert", "alert('Giriş kullanıcı tarafından iptal edildi.')", True)
                    Return
                End If
    
                Dim code As String = Request.QueryString("code")
                If Not String.IsNullOrEmpty(code) Then
                    Dim data As String = FaceBookConnect.Fetch(code, "me")
                    Dim faceBookUser As FaceBookUser = New JavaScriptSerializer().Deserialize(Of FaceBookUser)(data)
                    ' faceBookUser.ProfilResmi = string.Format("https://graph.facebook.com/{0}/picture", faceBookUser.Id);
    
                    Session("uyeid") = faceBookUser.Id
                    Session("resimicin") = faceBookUser.KullaniciAdi
                    Session("isim") = faceBookUser.AdSoyad
                    Session("mail") = faceBookUser.Email
                    '   imgProfilResmi.ImageUrl = faceBookUser.ProfilResmi
                    '    lblDogumGunu.Text = faceBookUser.DogumGunu
                    '   lblCinsiyet.Text = faceBookUser.Cinsiyet
                    '  lblYer.Text = faceBookUser.Yer.Adi
                    btnFaceLogin.Enabled = False
                    Session("magazaicinuyeid") = faceBookUser.Id
    
    
                End If
                Response.Redirect("Default.aspx")
    
            End If
        End Sub
        Protected Sub btnFaceLogin_Click(sender As Object, e As ImageClickEventArgs)
            FaceBookConnect.Authorize("email,user_location,user_birthday", Request.Url.AbsoluteUri.Split("?"c)(0))
        End Sub
        Public Class FaceBookUser
            Public Property Id() As String
                Get
                    Return m_Id
                End Get
                Set(value As String)
                    m_Id = Value
                End Set
            End Property
            Private m_Id As String
            Public Property AdSoyad() As String
                Get
                    Return m_AdSoyad
                End Get
                Set(value As String)
                    m_AdSoyad = Value
                End Set
            End Property
            Private m_AdSoyad As String
            Public Property KullaniciAdi() As String
                Get
                    Return m_KullaniciAdi
                End Get
                Set(value As String)
                    m_KullaniciAdi = Value
                End Set
            End Property
            Private m_KullaniciAdi As String
            Public Property ProfilResmi() As String
                Get
                    Return m_ProfilResmi
                End Get
                Set(value As String)
                    m_ProfilResmi = Value
                End Set
            End Property
            Private m_ProfilResmi As String
            Public Property Email() As String
                Get
                    Return m_Email
                End Get
                Set(value As String)
                    m_Email = Value
                End Set
            End Property
            Private m_Email As String
            Public Property DogumGunu() As String
                Get
                    Return m_DogumGunu
                End Get
                Set(value As String)
                    m_DogumGunu = Value
                End Set
            End Property
            Private m_DogumGunu As String
            Public Property Cinsiyet() As String
                Get
                    Return m_Cinsiyet
                End Get
                Set(value As String)
                    m_Cinsiyet = Value
                End Set
            End Property
            Private m_Cinsiyet As String
            Public Property Yer() As FaceBookEntity
                Get
                    Return m_Yer
                End Get
                Set(value As FaceBookEntity)
                    m_Yer = Value
                End Set
            End Property
            Private m_Yer As FaceBookEntity
        End Class
    
        Public Class FaceBookEntity
            Public Property Id() As String
                Get
                    Return m_Id
                End Get
                Set(value As String)
                    m_Id = Value
                End Set
            End Property
            Private m_Id As String
            Public Property Adi() As String
                Get
                    Return m_Adi
                End Get
                Set(value As String)
                    m_Adi = Value
                End Set
            End Property
            Private m_Adi As String
        End Class

    bu kodlarla bağlanmaya çalışıyorum ancak şöyle hata veriyor

    { "hata": { "message": "client_id parametresini eksik." "tip": "OAuthException" "code": 101, "fbtrace_id": "E35TvuEWdoy" } }



    28 Kasım 2015 Cumartesi 13:36