VB codes.. Please help
2013-12-09, 04:31 AM,
#1
Anyone know how I can load the FB profile picture and name of a person on VB when I put his/her facebook profile url and click.. Start Hacking?

Thanks in advance..
Latest Thanks - View all

tommytommy(2014-02-25 03:52 AM) 

How much you can take and keep moving forward.
That's how winning is done!

Reply
2013-12-09, 04:38 AM,
#2
Well look into web requests :) I think that should do the trick :)
http://developer.chrome.com/extensions/webRequest.html
Latest Thanks - View all

dahilan01(2013-12-09 05:08 AM) 

http://www.hostwinds.com/
Coupons:
5 cents - 99 off hosting- "cpaelite99off"
VPS liftime 25% off- "cpaelites25vps"
Reply
2013-12-09, 04:47 AM,
#3
You need to take the "src" from image class "profilePic" from the "http://www.facebook.com/<username>"
then display it in a picture box like this:

Code:
Public Function webDownloadImage(ByVal Url As String, Optional ByVal saveFile As Boolean = False, Optional ByVal location As String = "C:\") As Image
    
            Dim webClient As New System.Net.WebClient
            Dim bytes() As Byte = webClient.DownloadData(Url)
            Dim stream As New IO.MemoryStream(bytes)
    
            If saveFile Then My.Computer.FileSystem.WriteAllBytes(location, bytes, False)
    
            Return New System.Drawing.Bitmap(stream)
    
        End Function

and display it like this

Code:
PictureBox1.Image = webDownloadImage("http://www.somewebsite.com/image.jpg", True, "C:\temp.jpg")

Sorry I dont have a lot of time now to explain how to retrieve the url of the image for the class "profilePic"...if you can't do it until tomorrow i will take 10 mins and help you
Latest Thanks - View all

HQAccs(2013-12-09 05:23 AM) 
Reply
2013-12-09, 05:08 AM,
#4
(2013-12-09, 04:47 AM)qannabōs Wrote: You need to take the "src" from image class "profilePic" from the "/<username>"
then display it in a picture box like this:

Code:
Public Function webDownloadImage(ByVal Url As String, Optional ByVal saveFile As Boolean = False, Optional ByVal location As String = "C:\") As Image
    
            Dim webClient As New System.Net.WebClient
            Dim bytes() As Byte = webClient.DownloadData(Url)
            Dim stream As New IO.MemoryStream(bytes)
    
            If saveFile Then My.Computer.FileSystem.WriteAllBytes(location, bytes, False)
    
            Return New System.Drawing.Bitmap(stream)
    
        End Function

and display it like this

Code:
PictureBox1.Image = webDownloadImage("/image.jpg", True, "C:\temp.jpg")

Sorry I dont have a lot of time now to explain how to retrieve the url of the image for the class "profilePic"...if you can't do it until tomorrow i will take 10 mins and help you

Thank you so MUCH sir.. I really appreciate your help. Godbless. I will wait till tomorrow. Thank you

How much you can take and keep moving forward.
That's how winning is done!

Reply
2013-12-09, 05:24 AM,
#5
Please update that information tomorrow! Such information would be more than valuable for me. Thank you!

Cheap HQ Instagram Accounts (Aged and Fresh) - >>CLICK THERE<<
Reply
2013-12-09, 08:30 PM,
#6
(2013-12-09, 04:47 AM)qannabōs Wrote: Sorry I dont have a lot of time now to explain how to retrieve the url of the image for the class "profilePic"...if you can't do it until tomorrow i will take 10 mins and help you

I hope you can also share us to load the name on VB not only the profile picture..

How much you can take and keep moving forward.
That's how winning is done!

Reply
2013-12-09, 10:05 PM,
#7
Loading the profile picture just needs 1 line of code, if you have the profile ID! :)
Latest Thanks - View all

arun9020(2013-12-09 11:15 PM) 

Join The Best Network Today And Earn REAL Money! The secret to success lies here.

[Image: jqE21u3.gif]
Reply
2013-12-10, 02:08 AM,
#8
(2013-12-09, 10:05 PM)Superhero99 Wrote: Loading the profile picture just needs 1 line of code, if you have the profile ID! :)

so do you have the tutorial sir.. on how to code it on VB? Thank you

How much you can take and keep moving forward.
That's how winning is done!

Reply
2013-12-12, 07:12 PM,
#9
Up for this one.. Thank you

How much you can take and keep moving forward.
That's how winning is done!

Reply
2013-12-14, 10:19 AM,
#10
Add a textbox, button and label to your project. Enter the FB username you want to lookup in the textbox.

You need to fix the FB links, i cant post links
Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Profile = TextBox1.Text
        PictureBox1.ImageLocation = GetFacebook.ProfileImage
        Label1.Text = GetFacebook.Username
    End Sub

    Dim Profile As String
    Public Function GetFacebook() As Facebook
        Try

            Dim wc As New Net.WebClient
            wc.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0")
            wc.Headers.Add("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
            wc.Headers.Add("referer", "xxx.facebook.xxx/")
            Dim value As String = wc.DownloadString("facebook.xxx/" & Profile)
            Dim result As New Facebook()
            result.Username = GetBetween(value, "<title id=""pageTitle"">", " | Facebook</title>")
            result.ProfileImage = GetBetween(value, "<img class=""profilePic img"" src=""", """ alt=")
            Return result
        Catch
            Return Nothing
        End Try
    End Function

    Public Class Facebook
        Public Property Username() As String
            Get
                Return x_Username
            End Get
            Set(ByVal value As String)
                x_Username = value
            End Set
        End Property
        Private x_Username As String
        Public Property ProfileImage() As String
            Get
                Return x_ProfileImage
            End Get
            Set(ByVal value As String)
                x_ProfileImage = value
            End Set
        End Property
        Private x_ProfileImage As String
    End Class


    Private Shared Function GetBetween(ByVal Source As String, ByVal Startx As String, ByVal Endx As String) As Object
        Dim num As Integer = Startx.Length
        Dim startIndex As Integer = Source.IndexOf(Startx) + num
        Dim index As Integer = Source.IndexOf(Endx, startIndex)
        Return Source.Substring(startIndex, (index - startIndex)).Trim
    End Function

End Class
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Aeonsofts VB.NET Theme Manager v2.1 lanzye 29 9,744 2017-06-20, 06:55 PM
Last Post: storix
  VB NET FORM APPLICATION QwertySon 12 1,740 2016-04-27, 08:00 PM
Last Post: Harrington
  [Coupons] GoDaddy Coupon codes Oct/2015 SiriusBlack 6 939 2015-10-27, 11:38 PM
Last Post: traffbizz
  Best available vb.net theme? SteelHard 1 1,104 2015-01-30, 01:55 AM
Last Post: Yaznas
  PLEASE TELL ME WHICH VB NET THEME THIS IS ? androtweaks 3 443 2015-01-27, 10:16 PM
Last Post: Riven




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top