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 に答える