2009-02-14 65 views
2

我正在玩Facebook开发工具包,我无法取得profile.setinfo的工作。该文档没有用处。我正在使用最新的来源 - 28656.Facebook开发工具包.net - setinfo

有人可以发布一个VB.Net的例子给我吗?

更新:有人问我一个具体的问题,所以在这里它是:

Setinfo一个List(中facebook.Schema.info_field)

和info_field应该采取一个List(脸谱.Schema.info_item)

但它似乎想要一个itemsLocalType来代替。所以错误是

无法强制'System.Collections.Generic.List`1 [facebook.Schema.info_item]'类型的对象键入'itemsLocalType'。

+0

您可以通过谷歌搜索找到样本...如果你有一个具体问题发布细节。 – 2009-02-14 02:11:05

回答

6

我终于解了我自己:

Dim items = New facebook.Schema.info_field.itemsLocalType  
items.info_item.add(New Schema.info_item With {.label = "Happy", .image = "http://imageurl1/", .sublabel = "", .description = "The original and still undefeated.", .link = "http://www.scottstonehouse.ca/blog"}) 

items.info_item.Add(New Schema.info_item With {.label = "Indifferent", .image = "http://imageurl2/", .sublabel = "", .description = "meh....", .link = "http://www.scottstonehouse.ca/blog"}) 

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

items.info_item.Add(New Schema.info_item With {.label = "Cool", .image = "http://imageurl4/", .sublabel = "", .description = "Yeah. whatever", .link = "http://www.scottstonehouse.ca/blog"}) 

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

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

_fbService.API.profile.setInfo("Info Title", 5, ifields, _fbService.API.uid)