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

+Set location #224

Merged
merged 1 commit into from
Oct 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}