【问题标题】:Infusionsoft XML RPC APIInfusionsoft XML RPC API
【发布时间】:2018-06-08 11:26:53
【问题描述】:

我正在尝试查找是否在联系人上应用了特定标签。但我不确定使用哪种方法。我正在使用 infuionsoft XML rpc API https://developer.infusionsoft.com/docs/xml-rpc/ 并使用 PHP。我可以添加或删除联系人的标签。这是我的开始

###Set up the call to add to the group###
$call = new xmlrpcmsg("DataService.query", array(
    php_xmlrpc_encode('ourapikey'), #The encrypted API key
    php_xmlrpc_encode('ContactGroupAssign'), //Table to search for tag
    php_xmlrpc_encode(1), //limit
    php_xmlrpc_encode(0), //number of pages 
    php_xmlrpc_encode('Contact.Id => ~=~ 12566'), //i am searching for this contact id

));

###Send the call###
$result = $client->send($call);
 if ($result->faultCode()) {
    echo $result->faultCode() . "<BR>";
    echo $result->faultString() . "<BR>";
}else{
    print_r($result);
}

但我收到 No method matching arguments 错误。任何帮助都将受到高度评价。

【问题讨论】:

    标签: xml-rpc infusionsoft


    【解决方案1】:

    此错误意味着您尝试与之通信的方法需要获取另一个参数。

    首先,仔细查看documentation,您可能会发现 selectedFields 是必需的,并且 queryData 必须是一个结构,在 PHP 中,您可以使用大批。

    在您的情况下,这些参数可能是这样的
    queryData ['ContactId' =&gt; 12566]
    selectedFields ['ContactId', 'GroupId']

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-14
      • 1970-01-01
      • 2021-03-02
      • 2013-09-12
      • 1970-01-01
      • 2012-12-29
      相关资源
      最近更新 更多