1

我在 iOS 中有这段代码,它将一串值组合在一起提交给 hubpot。除产品字符串外,所有内容都提交并创建联系人记录记录。这是我用swift编写的代码。

let params: [String:String] = [
    "email": self.emailTextField.text ?? "",
    "firstname": self.firstnameTextField.text ?? "",
    "lastname": self.lastnameTextField.text ?? "",
    "company": self.companyTextField.text ?? "",
    "phone": self.phoneNumberTextField.text ?? "",
    "what_best_describes_your_role_": self.roleTextField.text ?? "",
    "what_products_systems_are_you_interested_in_": products.reduce("") { "\($0);\($1.currentTitle!)" },
    "toolbox":"Yes"
]
HubspotProvider().register(params: params, completion: nil)

Hubspot 声明您需要在每个条目之前附加一个分号以提交一串值。“what_products_systems_are_you_interested_in_”不会添加到联系人记录中。我不确定需要什么。我似乎找不到太多的文档。我附上一张图片以显示 Hubspot 中的错误。至于 android 参考,我正在添加适用于 android 的代码。可能这将是两种语言之间关于我在这里缺少的内容的指标。谢谢大家的帮助。

安卓代码参考如下:

"what_products_systems_are_you_interested_in_" 到 ";"+user.products.joinToString (separator = ";"){ it },

Hubspot 联系记录错误

4

1 回答 1

-1

我找到了一个解决方案,以防有人想知道。这是分号所在的位置。请参阅代码以供参考。

products.reduce("") { "\($0);\($1.currentTitle!)" },

products.reduce("") { "\($0)\($1.currentTitle!);" },
于 2020-02-12T19:36:40.847 回答