From 2ccff7218f8c98d45d98d051adade75196e5f4af Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 9 Jul 2015 12:35:23 +0200 Subject: [PATCH] find nearby friends added --- src/snapchat.php | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/snapchat.php b/src/snapchat.php index 399105f..18a2860 100644 --- a/src/snapchat.php +++ b/src/snapchat.php @@ -2208,6 +2208,45 @@ public function sendTyping($recipients) return $result; } + /** + * Find nearby snapchatters + * + * @param string $action: update or delete + * @param string $latitude + * @param string $longitude + * + * RETURN json object with nearby snapchatters + */ + public function findNearbyFriends($action, $latitude, $longitude) + { + if(!$this->auth_token || !$this->username) + { + return FALSE; + } + + $timestamp = parent::timestamp(); + $result = parent::post( + '/bq/find_nearby_friends', + array( + 'accuracyMeters' => '65.000000', + 'action' => $update, + 'timestamp' => $timestamp, + 'username' => $this->username, + 'lat' => $latitude, + 'long' => $longitude, + 'totalPollingDurationMillis' => '20000' + ), + array( + $this->auth_token, + $timestamp + ), + $multipart = false, + $debug = $this->debug + ); + + return $result; + } + /** * Sets a story. *