users.getInfo() no longer works

Jan 28, 2009 at 10:21 PM
Edited Jan 28, 2009 at 10:27 PM
Imports ImportsSystem.Collections.ObjectModel
Imports System.Configuration
Imports System.Web
Imports facebook.Schema
Imports facebook.web Private _fbService As Facebook.Components.FacebookService = New Facebook.Components.FacebookService()

Dim u As user = _fbService.users.getInfo()

Label1.Text = u.first_name
Label1.Text += u.about_me
Label1.Text += u.activities
Label1.Text +=
Label1.Text += u.interests
Label1.Text += u.birthday_date



How do I use users.getInfo() ? Thanks

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 75:         Dim u As user = _fbService.users.getInfo()
Line 76: 
Line 77: Label1.Text = u.first_nameLine 78:         Label1.Text += u.about_me
Line 79:         Label1.Text += u.activities

Source File: C:\Inetpub\wwwroot\\wwwroot\cplanetfacebook.aspx.vb    Line: 77

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   cplanetfacebook.Button1_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\\wwwroot\cplanetfacebook.aspx.vb:77
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565








Feb 22, 2009 at 5:05 PM
Edited Feb 22, 2009 at 5:08 PM

I was wondering if you resolved your problem. I have the same problem. There's inconsistence between the Facebook Developers Wiki documentation here

and the Facebook Toolkit 2.0. Maybe the toolkit is outdated. But I need to get the logged in user's userId before I have established a session (so no session key atm) with the user.

Does anyone out there have a solution?

Thanks in advance.