I'm trying to get the following code to work:
Imports Microsoft.VisualBasic
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Collections.ObjectModel
Imports Facebook
Imports Facebook.WebControls
Public Partial Class _Default
Inherits CanvasIFrameBasePage
Private Const FACEBOOK_API_KEY As String = "xxxxxxxxxx"
Private Const FACEBOOK_SECRET As String = "yyyyyyyyyy"
Shadows Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
MyBase.Api = FACEBOOK_API_KEY
MyBase.Secret = FACEBOOK_SECRET
MyBase.Page_Load(sender, e)
If (Not IsPostBack) Then
Try
' Use the FacebookService Component to populate Friends
Dim u As Facebook.Entity.User = Me.FBService.GetUserInfo()
Dim f As Collection(Of Facebook.Entity.User) = Me.FBService.GetFriends()
Dim s As String = ""
If f.Count <> 1 Then
s = "s"
End If
lblHelloWorld.Text = "Hello " & u.Name & " you have " & f.Count & " friend" & s & "..." & Me.FBService.SessionKey
Me.FBService.SetFBML("Hello " & u.Name & " you have " & f.Count & " friend" & s)
Catch e1 As Exception
'Throw
End Try
End If
End Sub
End Class
but i keep getting the error:
Requested value 'Networking' was not found.
failing on this line:
Dim u As Facebook.Entity.User = Me.FBService.GetUserInfo()
Can anyone help please? :(
It is called the Facebook Toolkit, located at http://facebooktoolkit.codeplex.com/