代码之家  ›  专栏  ›  技术社区  ›  ScottStonehouse

用于.net的Facebook开发工具包-setinfo

  •  2
  • ScottStonehouse  · 技术社区  · 17 年前

    我正在玩Facebook开发工具包,无法让profile.setinfo正常工作。这些文档没有用处。我使用的是最新的来源——28656。

    有人能帮我发一个VB.Net的例子吗?

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

    Setinfo获取一个列表(facebook.Schema.info_字段)

    但它似乎需要一个itemsLocalType。所以错误是

    1 回复  |  直到 17 年前
        1
  •  6
  •   ScottStonehouse    17 年前

    我终于自己解决了:

    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)