[英]PHP icontact API integration
我正在使用icontact api 2.0將icontact列表集成到我的站點中。 我在創建新列表和添加新消息時遇到問題,它無法使用API創建任何列表。但是我可以創建聯系人和訂閱等等。使用的代碼是
require_once('lib/iContactApi.php');
// Give the API your information
iContactApi::getInstance()->setConfig(array(
'appId' => 'my_APIID',
'apiPassword' => 'my_password',
'apiUsername' => 'my_username'
));
// Store the singleton
$oiContact = iContactApi::getInstance();
$oiContact->addList('test', 4424, true, false, false, 'Just an example list',"test");
$oiContact->addMessage('An Example Message', 585, '<h1>An Example Message</h1>', 'An Example Message', 'ExampleMessage', 33765, 'normal');
// Schedule send
$oiContact->sendMessage(array(33765), 179962, null, null, null, mktime(0, 0, 0, 10, 03, 2012));
還檢查了一些幫助,但未找到任何解決方法http://www.softwareprojects.com/resources/programming/t-icontact-20-api-integration-php-example-1925.html
問題可能出在addList的第二個參數上
$oiContact->addList('test', 4424, true, false, false, 'Just an example list',"test");
4424-必須是您的列表之一已經存在的有效消息ID,如果您轉到icontact儀表板並為其中一個列表創建歡迎消息,然后對其進行編輯,您將在url上看到“ iMessageId”參數。 您可以使用它作為第二個參數,它應該可以工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.