`place_id` is not welcomed in update tweet with RestAPI?


#1

I am sending geo tweet using RestAPI.

Without place_id, everything goes fine. With place_id, the total geo info is dismissed. Though the response JSON right after the “https://api.twitter.com/1.1/statuses/update.json” shows parts of the full geo info.

I am assuming that place_id is something that I can name myself. For example, if I am in Sleeping Beaty Castle, Disneyland. I could use “Sleeping Beaty Castle, Disneyland” as my place_id. Is that correct?

The JSON I got after I sent the tweet was something like this

“geo”:{“type”:“Point”,“coordinates”:[numbers,numbers]},“coordinates”:{“type”:“Point”,“coordinates”:[numbers,numbers]},“place”:null

So the lat and long were left and “place_id” was dropped. But in twitter.com, the whole geo info was dropped. It was just like a none-geo info tweet.


#2

The value of place_id has to be the ID of a Place object. You can search for Place objects with GET geo/search.


#3

Thank you, @abraham. I have seen you in many geo related posts. So I think you must be an expert on this.

I just did a new research and found that the api GET geo/search got were names of cities. I don’t know why a [lat, long] point with accuracy of 100 meters could lead to so many cities. Any reason?

The point is from goole earth of Disneyland [33.81209177,-117.91897421]. https://www.google.com/maps/search/?api=1&query=33.81209177,-117.91897421

If the first city in the city names list is the most accurate. Then searching the place_id is totally unnecessary. As tweet without place_id use it by twitter internally.

Also, I clicked the city name on twttier.com, and I found out that some tweets with “Disneyland” were also shown. Showing “Disneyland” was what I wanted, however I could’t get it by twitter’s api. And those were cataloged as “Powered by Foursquare”.

https://twitter.com/search?q=place%3A07d9e38a39083000

So this is a special treatment for people who use foursquare only?

// below is the simplified city name lists from the Disneyland geo point

GeoSearchPlace(fullName: “Anaheim, CA”, id: “0c2e6999105f8070”, name: “Anaheim”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/0c2e6999105f8070.json”)
GeoSearchPlace(fullName: “Garden Grove, CA”, id: “70707114a9202b98”, name: “Garden Grove”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/70707114a9202b98.json”)
GeoSearchPlace(fullName: “Orange, CA”, id: “20ba6fb3b1ee82da”, name: “Orange”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/20ba6fb3b1ee82da.json”)
GeoSearchPlace(fullName: “Santa Ana, CA”, id: “0562e9e53cddf6ec”, name: “Santa Ana”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/0562e9e53cddf6ec.json”)
GeoSearchPlace(fullName: “Fullerton, CA”, id: “2feb76248fd9c581”, name: “Fullerton”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/2feb76248fd9c581.json”)
GeoSearchPlace(fullName: “Stanton, CA”, id: “35fea2c31d822962”, name: “Stanton”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/35fea2c31d822962.json”)
GeoSearchPlace(fullName: “Buena Park, CA”, id: “0b93bc6a33455615”, name: “Buena Park”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/0b93bc6a33455615.json”)
GeoSearchPlace(fullName: “Westminster, CA”, id: “d07feb9e5b1ce37c”, name: “Westminster”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/d07feb9e5b1ce37c.json”)
GeoSearchPlace(fullName: “Placentia, CA”, id: “ef74afb7ccba74d6”, name: “Placentia”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/ef74afb7ccba74d6.json”)
GeoSearchPlace(fullName: “Cypress, CA”, id: “a077793faceeda6f”, name: “Cypress”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/a077793faceeda6f.json”)
GeoSearchPlace(fullName: “Fountain Valley, CA”, id: “00c12e8612b69ccf”, name: “Fountain Valley”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/00c12e8612b69ccf.json”)
GeoSearchPlace(fullName: “Tustin, CA”, id: “02215ae29a77567c”, name: “Tustin”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/02215ae29a77567c.json”)
GeoSearchPlace(fullName: “North Tustin, CA”, id: “002c095d059ebf44”, name: “North Tustin”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/002c095d059ebf44.json”)
GeoSearchPlace(fullName: “Villa Park, CA”, id: “d7c60f65754071ac”, name: “Villa Park”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/d7c60f65754071ac.json”)
GeoSearchPlace(fullName: “La Mirada, CA”, id: “4db990e393c2e28b”, name: “La Mirada”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/4db990e393c2e28b.json”)
GeoSearchPlace(fullName: “La Habra, CA”, id: “7a615ec218d177f6”, name: “La Habra”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/7a615ec218d177f6.json”)
GeoSearchPlace(fullName: “Brea, CA”, id: “341aa0cdb944022e”, name: “Brea”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/341aa0cdb944022e.json”)
GeoSearchPlace(fullName: “Cerritos, CA”, id: “19d41c6eff11e9d6”, name: “Cerritos”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/19d41c6eff11e9d6.json”)
GeoSearchPlace(fullName: “La Palma, CA”, id: “641cdaa7992c949e”, name: “La Palma”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/641cdaa7992c949e.json”)
GeoSearchPlace(fullName: “Los Alamitos, CA”, id: “0799ff0a3c1006e9”, name: “Los Alamitos”, placeType: “city”, url: “https://api.twitter.com/1.1/geo/id/0799ff0a3c1006e9.json”)


#4

It looks like the API might be having issues returning poi results.