C# 应为类型字符串,但收到值为0的类型整数

C# 应为类型字符串,但收到值为0的类型整数,c#,facebook-graph-api,C#,Facebook Graph Api,我在做营销API。我想点击这个Api来估计目标受众,基本上是多少用户能够看到我的广告 "https://graph.facebook.com/v2.2/{adaccountid}/reachestimate" 在通过此参数“flexible_spec”之前,我将得到响应。每当我传递这个参数时,我都会得到这样的响应:“应该是类型字符串,但接收到值为0的类型整数”。我寻找它,但没有解决办法 我将向您展示我迄今为止所做的尝试: 1)"https://graph.facebook.com/v2.2

我在做营销API。我想点击这个Api来估计目标受众,基本上是多少用户能够看到我的广告

 "https://graph.facebook.com/v2.2/{adaccountid}/reachestimate"
在通过此参数“flexible_spec”之前,我将得到响应。每当我传递这个参数时,我都会得到这样的响应:“应该是类型字符串,但接收到值为0的类型整数”。我寻找它,但没有解决办法

我将向您展示我迄今为止所做的尝试:

 1)"https://graph.facebook.com/v2.2//{adaccountid}/reachestimate?     targeting_spec={"geo_locations":{"countries":   ["IN"]},"flexible_spec":{"interests":["6006289279425"]}}
 2) "https://graph.facebook.com/v2.2//{adaccountid}/reachestimate?     targeting_spec={"geo_locations":{"countries":   ["IN"]},"flexible_spec":{"interests":["Movies"]}} 
 3)"https://graph.facebook.com/v2.2//{adaccountid}/reachestimate?     targeting_spec={"geo_locations":{"countries":   ["IN"]},"flexible_spec":{"interests":["id":"6006289279425","name":"Movies"]}}

我尝试过在flexible_spec interest中发送一个id数组,在flexible_spec interest中发送一个name数组,我还尝试过在其中发送
list
。但是运气不好。

我找了很多关于这个错误的信息。然后我开始了解我在这个API中犯的错误。我们可以指定两种类型的兴趣字段:

 1) targeting_spec={"geo_locations":{"countries":"IN"]},"flexible_spec":[{"interests":["6006289279425"]}]}
 2) targeting_spec={"geo_locations":{"countries":   ["IN"]},"interests":["6006289279425","46345343534"]}
第一个在flexible_spec数组中传递兴趣数组。 第二个将兴趣作为数组对象传递,但不在flexible_spec中

这对我有帮助。我之所以发布这个答案,是因为在同样的情况下,它也可能对你有所帮助。 谢谢