Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #224 from dundua/patch-1
Browse files Browse the repository at this point in the history
+Set location
  • Loading branch information
mgp25 committed Oct 11, 2015
2 parents 6d4d7f5 + c853884 commit 3e4acc9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/snapchat.php
Original file line number Diff line number Diff line change
Expand Up @@ -3184,4 +3184,43 @@ public function getSnaptag()

return $result;
}

/**
* Set/update your location for geofilters, weather info, and local stories.
*
* @param int $lat
* Latitude.
*
* @param int $lon
* Longitude.
*
* @param int $acc
* Accuracy in meters.
*
* @return json array
* Returns a JSON array with geofilters, local our stories, weather, and lens filters.
*/
public function setLocation($lat, $lon, $acc)
{
$timestamp = parent::timestamp();
$result = parent::post(
'/loq/loc_data',
array(
'timestamp' => $timestamp,
'lat' => $lat,
'long' => $lon,
'loc_accuracy_in_meters' => $acc,
'checksums_dict' => '{}',
'username' => $this->username
),
array(
$this->auth_token,
$timestamp,
),
$multipart = false,
$debug = $this->debug,
);

return $result;
}
}

0 comments on commit 3e4acc9

Please sign in to comment.