Hello all,

Having read a pile of posts and documentation, mostly outdated from before the dropping of geolocation in 2015 and the readding of precise location via the in app camera. I am now throughly confused as to what I should be expecting from/as “precise location”.

What I would like to see is a lat, lon, but as far as I can tell, when a user takes a photo and attaches a location - the location label dictates the location bounds. Which is in contrast to what the documentation says, where the location selection can differ from the label, but the exact/precise location will appear within the API.

My guess, is there is a “precise location” selection that isn’t showing in my V. 9+ Twitter API. I see it in the live stream section, but not, in the photo section. As well, when I create either, and then query them. I am not given lat, lon data, just the places, which when expanded are bounding boxes (or points) over predefined Foursquare locations.

So I am toughly confused as to expectations. The API data states that geo.coordinates exists, but if, I can’t instruct people to give precise geo encoded locations, then my planned model won’t work though twitter.

Just checking before I scrap the project, if it is just me, or is there things I don’t know that are getting in the way.

Thanks,
Justin

what exact API endpoint are you using?

In v2 API, the precise location is in geo.coordinates and you can get this specifying fields and expansions, but very few tweets have this at all. Most tweets with location have Place only.

For example: https://twitter.com/kamanonickname/status/1249702384659554308 json llooks like Geo Point coordinates not saved · Issue #39 · DocNow/twarc-csv · GitHub

1 Like

Hey thanks for reaching out. I was worried I would sink to the bottom here.

I’m using though a nodejs wrapper API LIB (twitter-api-v2) but it should equate.

Endpoint: * /2/users/:id/tweets*
Params:

  • ID,
  • ‘expansions’: ‘geo.place_id’,*
  • ‘exclude’: ‘replies’,*
  • ‘tweet.fields’: [‘id’,‘geo’]*

I’m looking to get the response geo.coordinates which will have children, point and lat, lon.

I don’t understand what is meant by:

To return this field, add tweet.fields=geo.coordinates in the request’s query parameter.

As stated in the bottom of the API page

I understand due to a policy change people don’t geotag much anymore. I expect my userbase to geotag, as it the only easy way to transmit geo to go with the “twitter report” they are sending.

My guess is I’m doing something wrong. I’m looking to pull corrds, as stated here:

Tweet location FAQs | Twitter Help

I have been using this account to test: PotSnap (@pot_snap) / Twitter
But only the live stream will let me do a “precise location” and that then defaults to a city level when queried.

Any direction would be great. I have also followed the help page on enabling “precise” which then allows me to “see” or make precise, but again I’m not seeing it in the in app camera.

Pixel 2 XL. ver 9.33.0-release.0

1 Like

Your parameters look ok, what i mean was that, the coordinates are inside the geo object:

"geo": {
        "coordinates": {
          "type": "Point",
          "coordinates": [
            42.77810097,
            88.01785747
          ]
        }

See the full json example: Geo Point coordinates not saved · Issue #39 · DocNow/twarc-csv · GitHub

In your @pot_snap tweets - i can only see Place geo, not exact coords. So they’re not being written correctly as far as i can tell.

"geo": {
        "place_id": "38d5974e82ed1a6c"
      }
1 Like

I did read your previous link, I didn’t understand what you wanted me to do. My guess was perhaps not having precise enabled and thus when publishing a tweet it is dropped/sanitized. Are you thinking it is a long outstanding bug?

To clarify, I’m not writing the tweets via the bot. Only trying to access the data. I loaded up TweetID 1249702384659554308 and I see the coors as expected.

So now the question is, how on the user application level does one add coors?

Do you have/see the ability to add precise in your in app photo as suggested by the help (pending you have it enabled)?

Lastly what is meant by add tweet.fields=geo.coordinates in the request’s query parameter? Seems odd considering tweet.fields will barf if you give it anything past “geo” + the other enums.

Thanks for pointing me to at least a tweet that has geo :slight_smile:

1 Like

Oh sorry, yeah - what i meant was that i’ve no idea how to force the twitter client to include the exact geo coordinates, like in the linked example. I know you can do it with the v1.1 API: POST statuses/update | Docs | Twitter Developer Platform

Your parameters are correct for tweet.fields from the looks of it.