VB.Net with Facebook C# SDK Simple Example to access user details

Throughout digging in to internet finally i am writing this for VB.net geeks:

Step1 : Install FB C# SDK through Nuget in Visual studio 2010. (Install Nuget first if dont have)

Step2: Creat new VB.new Windows Project.

Step3. Right click project >  Manage Nuget Packages (Its below add reference)

Now you are ready to have reference to use FB C# SDK in Vb.Net App without creating/converting DLL.

Open your Form.vb
and import Facebook.

Here is an simple example to get detail of any fb userid.


Imports Facebook
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  Dim fb1 = New FacebookClient()
        Dim result1 = fb1.[Get]("vinodkotiya") '"vinodkotiya?fields=id"
        TextBox1.Text = result1.ToString    'or use result1(0).ToString 
End Sub

End Class

- By Vinod Kotiya

Comments