Squashed commit of the following:
commit ee8c6db5ce1ebf8dbcef81848e8a99e3c102f964 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Oct 5 17:29:02 2016 +0100 Add info to changelog commit d0b213673698691f4624d6aef8b9067a21e722fc Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Oct 5 17:27:38 2016 +0100 Use the correct variable name commit 5d5dd00409f61403e4097503c6b3d75a3f83c9c8 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Oct 5 17:26:39 2016 +0100 Add lat/lng values to a tweet if we know them
This commit is contained in:
parent
b2cfe546f7
commit
4e6148e038
2 changed files with 13 additions and 10 deletions
|
@ -45,20 +45,20 @@ class SyndicateToTwitter implements ShouldQueue
|
|||
$tweetOpts['in_reply_to_status_id'] = $noteprep->replyTweetId($this->note->in_reply_to);
|
||||
}
|
||||
|
||||
/*if ($this->note->location) {
|
||||
if ($this->note->location) {
|
||||
$explode = explode(':', $this->note->location);
|
||||
$location = (count($explode) == 2) ? explode(',', $explode[0]) : explode(',', $explode);
|
||||
$lat = trim($location[0]);
|
||||
$long = trim($location[1]);
|
||||
$jsonPlaceId = Twitter::getGeoReverse(array('lat' => $lat, 'long' => $long, 'format' => 'json'));
|
||||
$parsePlaceId = json_decode($jsonPlaceId);
|
||||
$placeId = $parsePlaceId->result->places[0]->id ?: null;
|
||||
$lng = trim($location[1]);
|
||||
}
|
||||
if ($this->note->place) {
|
||||
$lat = $this->note->place->getLat();
|
||||
$lng = $this->note->place->getLng();
|
||||
}
|
||||
if (isset($lat) && isset($lng)) {
|
||||
$tweetOpts['lat'] = $lat;
|
||||
$tweetOpts['long'] = $long;
|
||||
if ($placeId) {
|
||||
$tweetOpts['place_id'] = $placeId;
|
||||
}
|
||||
}*/
|
||||
$tweetOpts['long'] = $lng;
|
||||
}
|
||||
|
||||
$mediaItems = $this->note->getMedia();
|
||||
if (count($mediaItems) > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue