如何导出/链接用户电子邮件?

时间:2014-10-31 20:56:21

标签: parse-platform

所以我们使用Parse.com的注册,用户注册的电子邮件进入用户类。我们目前也在使用MailChimp作为我们的广告系列软件。我们如何导出或链接这两个,以便注册的任何电子邮件到我们的MailChimp列表?

我知道Parse与Mandrill和SendGrid有一些云模块集成,但没有直接与MailChimp集成。

1 个答案:

答案 0 :(得分:1)

也许这些文章可以帮助您: https://www.parse.com/questions/mailchimp

Github项目:针对Parse.com Cloud Code优化的Mailchimp API + Mandrill API https://github.com/icangowithout/parse-mailchimp/commit/0d75b8be9775347efd939c8715d5d2b13076353c

var api_key = "YOUR_MAILCHIMP_API_KEY";

// use https and last verison
var options = {secure: true, version: "1.3"};

// Set the path to the mailchimp module
// If you cloned the mailchimp lib somewhere else, it's time to set this
// value properly
var module_path = "cloud/libs/mailchimp/";

var MailChimpAPI = require(module_path+"MailChimpAPI.js");
var myChimp = new MailChimpAPI(api_key, options, module_path); 
myChimp.ping({}, function(error, data){
    // data is a string or JSON parsed object
    if(error){
        // Oops… there was a problem...
    }else{
        // Do something with the data
    }
    // Handle what to do with the ping
});
//or
// Parse callback style
myChimp.ping({}, {
    success: function(data){
        // data is a string or JSON parsed object
        // Howdy! The ping worked!
    },
    error: function(error){
        // Something went wrong...
    }
});