Facebook SDK -如何用c#添加字段
本文关键字:添加 字段 何用 SDK Facebook | 更新日期: 2023-09-27 18:08:38
facebook SDK给出了传递注册表单字段的示例:
var fields = new object[]
{
new {name = "name"},
new {name = "email"},
new {name = "location"},
new {name = "gender"},
new {name = "birthday"},
new {name = "password", view = "not_prefilled"},
new {name = "like", description = "Do you like this plugin?",
type = "checkbox",
@default = "checked"},
new {name = "phone", description = "Phone Number", type = "text"},
new {name = "captcha"}
};
我想添加一个自定义typeahead字段。如:
new {name = "live", description = "Best Place to Live", type = "typeahead", categories = ("city, country, state_province")}
但是当我运行时,我在categories=语法上得到错误。说明类别是无效数组。我试过几种不同的语法,但似乎都行不通。添加类别的正确语法是什么?
for array use []
categories = new[] { "city", "country", "state_province" }