[英]PHP icontact API integration
I am using icontact api 2.0 for integrating the icontact list in my site. 我正在使用icontact api 2.0将icontact列表集成到我的站点中。 I face an issue with creating new list and adding new message its not create any list using the API.But i can create contact and subscribe and so on.. Code used is
我在创建新列表和添加新消息时遇到问题,它无法使用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));
Also checked some help but not found any soulution http://www.softwareprojects.com/resources/programming/t-icontact-20-api-integration-php-example-1925.html 还检查了一些帮助,但未找到任何解决方法http://www.softwareprojects.com/resources/programming/t-icontact-20-api-integration-php-example-1925.html
The problem is probably on the second parameter to addList 问题可能出在addList的第二个参数上
$oiContact->addList('test', 4424, true, false, false, 'Just an example list',"test");
4424 - has to be a valid message id that already exists for one of your list, if you go to your icontact dashboard and create a welcome message for one of your list and then edit it, you will see on the url an "iMessageId" parameter. 4424-必须是您的列表之一已经存在的有效消息ID,如果您转到icontact仪表板并为其中一个列表创建欢迎消息,然后对其进行编辑,您将在url上看到“ iMessageId”参数。 You can use this as the second parameter and it should work.
您可以使用它作为第二个参数,它应该可以工作。
https://app.sandbox.icontact.com/icp/core/code/message/edit/?token=ff1a8748b08088d41e69215c75295c98&iMessageId=1979804&sHubId=41254750ca180a4e7b3 https://app.sandbox.icontact.com/icp/core/code/message/edit/?token=ff1a8748b08088d41e69215c75295c98&iMessageId=1979804&sHubId=41254750ca180a4e7b3
ref: http://developer.icontact.com/documentation/lists/ 参考: http : //developer.icontact.com/documentation/lists/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.