This project has moved. For the latest updates, please go here.

Searching for Places

Search for places that can be attached to a status update.

Entity: Geo
Type: GeoType.Search
Name Purpose Type Required
Accuracy Radius to search string no
Attribute Name/value pair separated by "=" (i.e. "street_address=123 4th Street") string no
ContainedWithin PlaceID to restrict results to string no
Granularity Minimum granularity of place types string no
IP IP address of user string only if Lat, Long, and Query are empty
Lat Latitude to search dec only if IP and Query are empty
Long Longitude to search dec only if IP and Query are empty
MaxResults Max nearby results int no
Query URL encoded text search term string only if Lat, Long, and IP are empty

            var geoResponse =
                    (from geo in twitterCtx.Geo
                     where geo.Type == GeoType.Search &&
                           geo.IP == ""
                     select geo)

            if (geoResponse != null && geoResponse.Places != null)
                Place place = geoResponse.Places.First();

                    "Name: {0}, Country: {1}, Type: {2}",
                    place.Name, place.Country, place.PlaceType); 

Twitter API: geo/search

Last edited Nov 29, 2013 at 3:50 AM by JoeMayo, version 7