Advertisement.

TransHimalaya.in

Everest Helicopter Tour for a day

Book exciting packages at www.transhimalaya.in

VB.Net with Facebook C# SDK Access Token example


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 fb = New FacebookClient()
        Dim result = fb.[Get]("oauth/access_token", New With { _
         .client_id = "311353800176", _
         .client_secret = "d343aa747b817606a943430584899c73", _
         .grant_type = "client_credentials" _
        })  'Get these details from your app developer page of fb
        Dim accesstoken As String = result(0).ToString
        TextBox1.Text = "Access Token " & accesstoken & vbCrLf 'access token
End Sub

End Class

- By Vinod Kotiya

Comments

Most Viewed Post

solution for facebook static.ak.fbcdn.net waiting

Connect Sony XPLOD MEX-BT2500 Bluetooth CD Receiver with ur mobile

Crystal Report : Show data horizontally (Left to right) i.e. columns as rows

Google+ Followers