2

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

有人可以为我发布一个 VB.Net 示例吗?

更新:有人问我一个特定的问题,所以这里是:

Setinfo 需要一个 List(Of facebook.Schema.info_field)

和 info_field 应该采取一个列表(facebook.Schema.info_item)

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

无法将“System.Collections.Generic.List`1[facebook.Schema.info_item]”类型的对象转换为“itemsLocalType”类型。

4

1 回答 1

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)
于 2009-02-14T04:29:19.173 回答