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

Commit 3e4acc9

Browse files
committed
Merge pull request #224 from dundua/patch-1
+Set location
2 parents 6d4d7f5 + c853884 commit 3e4acc9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/snapchat.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,4 +3184,43 @@ public function getSnaptag()
31843184

31853185
return $result;
31863186
}
3187+
3188+
/**
3189+
* Set/update your location for geofilters, weather info, and local stories.
3190+
*
3191+
* @param int $lat
3192+
* Latitude.
3193+
*
3194+
* @param int $lon
3195+
* Longitude.
3196+
*
3197+
* @param int $acc
3198+
* Accuracy in meters.
3199+
*
3200+
* @return json array
3201+
* Returns a JSON array with geofilters, local our stories, weather, and lens filters.
3202+
*/
3203+
public function setLocation($lat, $lon, $acc)
3204+
{
3205+
$timestamp = parent::timestamp();
3206+
$result = parent::post(
3207+
'/loq/loc_data',
3208+
array(
3209+
'timestamp' => $timestamp,
3210+
'lat' => $lat,
3211+
'long' => $lon,
3212+
'loc_accuracy_in_meters' => $acc,
3213+
'checksums_dict' => '{}',
3214+
'username' => $this->username
3215+
),
3216+
array(
3217+
$this->auth_token,
3218+
$timestamp,
3219+
),
3220+
$multipart = false,
3221+
$debug = $this->debug,
3222+
);
3223+
3224+
return $result;
3225+
}
31873226
}

0 commit comments

Comments
 (0)