From a57a964a1d108c2e23e99dd31af9f89229854599 Mon Sep 17 00:00:00 2001 From: Andreas Heiberg Date: Mon, 29 Dec 2014 12:25:17 +0100 Subject: [PATCH] Fixed 400 Bad Request As suggested here new headers are needed https://github.com/hatboysam/JavaSnap/commit/ef5f821504f6a53fc03d6bdfeff690bae8ae9e96 --- src/snapchat_agent.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/snapchat_agent.php b/src/snapchat_agent.php index 1dc22a9..3ddf71b 100644 --- a/src/snapchat_agent.php +++ b/src/snapchat_agent.php @@ -295,6 +295,10 @@ public function post($endpoint, $data, $params, $multipart = FALSE) { CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $data, CURLOPT_URL => self::URL . $endpoint, + CURLOPT_HTTPHEADER => array( + 'Accept-Language: en-GB;q=1, en;q=0.9', + 'Accept-Locale: en' + ), ); curl_setopt_array($ch, $options);