Kit de herramientas de desarrollo de Facebook para .net - setinfo

votos
2

Estoy jugando con el kit de herramientas de desarrollo de Facebook y no puedo hacer que profile.setinfo funcione. La documentación no es útil. Estoy usando la última fuente - 28656.

¿Alguien puede publicar un ejemplo de VB.Net para mí, por favor?

Actualización: me preguntaron por un problema específico, así que aquí está:

Setinfo toma una lista (de Facebook.Schema.info_field)

y se supone que info_field toma una lista (de Facebook.Schema.info_item)

pero parece querer un itemsLocalType en su lugar. Entonces el error es

No se ha podido lanzar el objeto de tipo 'System.Collections.Generic.List`1 [facebook.Schema.info_item]' para escribir 'itemsLocalType'.

Publicado el 14/02/2009 a las 03:06
fuente por usuario
En otros idiomas...                            


1 respuestas

votos
6

Finalmente lo resolví solo:

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)
Respondida el 14/02/2009 a las 05:29
fuente por usuario

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more