【问题标题】:How do you subscribe and assign subscriber to group with the mailchimp api?您如何使用 mailchimp api 订阅和分配订阅者到组?
【发布时间】:2011-04-18 02:21:11
【问题描述】:

我正在尝试使用 PHP 中的 API 订阅并将订阅者分配给组。

我需要能够即时创建组,我正在尝试以下类似的方法,但收效甚微:

// include other relevant files here

$merge_vars = array(
   'FNAME'=>$name[0],
   'LNAME'=>$name[1], 
   'INTERESTS'=>'',
   'GROUPINGS'=>'Pets'
 );

如果我从数组中删除“分组”,订阅就可以正常工作 - 所以我们已经开始了......但是我们如何进行分组?

感谢您的宝贵时间

【问题讨论】:

    标签: php mailchimp


    【解决方案1】:

    我知道这有点晚了,但我认为这可能对其他人有所帮助。

    $merge_vars = array(
        'GROUPINGS' => array(
            0 => array(
                'id' => "101", //You have to find the number via the API
                'groups' => "Interest Name 1, Interest Name 2",
            )
        )
    );
    

    然后您可以使用listUpdateMember() 方法将现有订阅者添加到兴趣组。

    // Then use listUpdateMember to add them
    $objMailChimp->listUpdateMember($listID, $email, $merge_vars));
    

    【讨论】:

      【解决方案2】:

      在数组中再添加 1 个东西,即 "EMAIL" => "test@test.com"

      & 当你调用 listSubscribe() 检查你的

      apiKey、listId、

      "要添加到订阅者列表中的电子邮件 ID 在这里,即 test@test.com", EMAIL_TYPE 字段正确。

      试试这个。对你有帮助。

      【讨论】:

        猜你喜欢
        • 2014-09-29
        • 2020-10-07
        • 2015-10-17
        • 2013-07-19
        • 2018-05-15
        • 2016-07-01
        • 2017-06-11
        • 2016-03-20
        • 2015-11-11
        相关资源
        最近更新 更多