profile.setinfo - itemslocaltype?

Feb 10, 2009 at 5:23 AM

The definition for setinfo in the toolkit source looks like this:

Public Function setInfo(ByVal title As String, ByVal type As Integer, ByVal info_fields As System.Collections.Generic.List(Of facebook.Schema.info_item), ByVal uid As Long) As Boolean 

And here is the facebook definition:  

It seems to me the type of the info_fields parameter should be a list of info_field rather than a list of info_item.  Then again, I could be misunderstanding something.

Feb 14, 2009 at 2:48 AM
I must have been using an out of date version, this problem is not there anymore.

But there is another problem:

Setinfo takes a List(Of facebook.Schema.info_field) and info_field is supposed to take a List (Of facebook.Schema.info_item) but it seems to want an itemsLocalType instead. So the error is

Unable to cast object of type 'System.Collections.Generic.List`1[facebook.Schema.info_item]' to type 'itemsLocalType'.

Feb 14, 2009 at 4:25 AM
Edited Feb 14, 2009 at 4:33 AM
Finally figured this out - here's an example:


Dim items = New facebook.Schema.info_field.itemsLocalType




New Schema.info_item With {.label = "Happy", .image = "http://imageurl1/", .sublabel = "", .description = "The original and still undefeated.", .link = ""})




New Schema.info_item With {.label = "Indifferent", .image = "http://imageurl2/", .sublabel = "", .description = "meh....", .link = ""})




New Schema.info_item With {.label = "Sad", .image = "http://imageurl3/", .sublabel = "", .description = "Oh my god! you killed my dog!", .link = ""})




New Schema.info_item With {.label = "Cool", .image = "http://imageurl4/", .sublabel = "", .description = "Yeah. whatever", .link = ""})




Dim ifields = New List(Of facebook.Schema.info_field)()




New facebook.Schema.info_field With {.field = "test field name", .items = items})




"Info Title", 5, ifields, _fbService.API.uid)