Ich versuche, MailChimp API zu integrieren. Ich habe zwei verschiedene Bibliotheken ausgetauscht und den gleichen Fehler bekommen.404 Fehler bei Verwendung von MailChimp API mit CodeIgniter
[type] => http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/
[title] => Resource Not Found
[status] => 404
[detail] => The requested resource could not be found.
[instance] =>
Leider liefert dieser Fehler mir keine brauchbaren Informationen. Die Bibliothek, die ich verwende, ist this one.
Hier ist der Code, den ich in meinem Controller bin:
function __construct(){
parent::__construct();
$this->load->library('mailchimp');
$this->common = array(
'list_id' => '12345678',
);
}
public function signup() {
$form = $this->input->post();
if (!empty($form['website'])) {
// If Honey Pot is filled out
redirect('https://www.google.com');
} else {
$result = $this->mailchimp->call('POST',
'lists/'.$this->common['list_id'].'/members',
array(
'email_address' => $form['email'],
'merge_fields' => array(
"FNAME" => $form['first_name'],
"LNAME" => $form['last_name']
),
'status' => 'subscribed',
)
);
debug($result);
return true;
// Check Result
if ($result['status'] !== 'subscribed' && $result['status'] !== 'pending') {
return false;
} else {
return true;
}
}
}
Die debug
Funktion ein Helfer ist, ich habe das tut ein print_r
in <pre>
eingewickelt, um mein Leben zu erleichtern.
Ich hoffe, dies ist nur ein Fall von zu lange auf den Bildschirm starren und fehlt das offensichtliche oder es ist etwas nicht in Ordnung mit der MailChimp-API.