• 10-12-2015, 11:00:49
    #1
    Merhabalar, bir metod kullanmam gerekiyor. İhtiyacım olan şu.

    Örneğin fb.com/10153024744561106 bu linke girdiğimizde webrazzinin
    https://www.facebook.com/webrazzi/ph...561106/?type=3 bu şekilde link düzenleniyor asıl url ye yönleniyor.

    Ben fb.com/10153024744561106 linkinden tüm parametre bilgisine yani uzun url sine nasıl ulaşırım.

    Asp.net ile bu konu hakkında fikri olan varmıdır ?
  • 10-12-2015, 11:14:48
    #2
    Çok gizli bir bilgi aman diyim haaa facebook kızar sonra
    şaka şaka birazdan örnek bir kod yazacam. 15 dk ver bana
  • 10-12-2015, 11:23:41
    #3
    BigCoder adlı üyeden alıntı: mesajı görüntüle
    Çok gizli bir bilgi aman diyim haaa facebook kızar sonra
    şaka şaka birazdan örnek bir kod yazacam. 15 dk ver bana
    örnek kodunuzu bekliyorum yukarıdaki sadece bir örnekti bir çok metodda kullanım kolaylığı sağlayacak eğer bir mantık yürütebilirsek.
  • 10-12-2015, 11:35:09
    #4
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
            Dim r As String = getLocationURL("http://fb.com/10153024744561106")
    
            Label1.Text = r
    
        End Sub
    
        Public Function getLocationURL(fbURL As String) As String
            Dim sb As String = String.Empty
            Try
                Dim httpRequest As HttpWebRequest = DirectCast(WebRequest.Create(fbURL), HttpWebRequest)
                httpRequest.Method = "GET"
                httpRequest.AllowAutoRedirect = False
    
                Dim httpWebResponse As HttpWebResponse = DirectCast(httpRequest.GetResponse(), HttpWebResponse)
    
    
                sb = httpWebResponse.GetResponseHeader("Location")
    
                httpRequest = Nothing
            Catch
    
            End Try
    
            Return sb
        End Function
  • 10-12-2015, 11:47:57
    #5
    Webrequest ile sürekli atılan isteklerde facebook tarafından bir sıkıntı oluşmaz mı hocam ? Ben liste şeklinde çalıştıracağım yani yüzlerce sorgu söz konusu olur o zaman. Bu durumda facebook tarafından engellenme ile karşılaşma olabilir diye tahmin ediyorum ?



    BigCoder adlı üyeden alıntı: mesajı görüntüle
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
            Dim r As String = getLocationURL("http://fb.com/10153024744561106")
    
            Label1.Text = r
    
        End Sub
    
        Public Function getLocationURL(fbURL As String) As String
            Dim sb As String = String.Empty
            Try
                Dim httpRequest As HttpWebRequest = DirectCast(WebRequest.Create(fbURL), HttpWebRequest)
                httpRequest.Method = "GET"
                httpRequest.AllowAutoRedirect = False
    
                Dim httpWebResponse As HttpWebResponse = DirectCast(httpRequest.GetResponse(), HttpWebResponse)
    
    
                sb = httpWebResponse.GetResponseHeader("Location")
    
                httpRequest = Nothing
            Catch
    
            End Try
    
            Return sb
        End Function
  • 10-12-2015, 11:51:44
    #6
    O da senin şansına kalmış artık, engeller mi engellemez mi bilemiyorum.
    Bu arada şunu farkettim, o sorgudan sonra bi tane daha Location bilgisi aldırman lazım, iki defa yönleniyor.
  • 10-12-2015, 11:52:39
    #7
    İlgi alakanız için teşekkür ederim deneyelim.

    BigCoder adlı üyeden alıntı: mesajı görüntüle
    O da senin şansına kalmış artık, engeller mi engellemez mi bilemiyorum.
    Bu arada şunu farkettim, o sorgudan sonra bi tane daha Location bilgisi aldırman lazım, iki defa yönleniyor.