Find country a tweet is from - if Geo location is disabled - twitter

Is it possible to fine country a tweet is from - if Geo location is disabled?

there is nothing we can do except guessing with user specified location (can be hell,heaven,universe too) and language

Related

How do I set a custom location for requests?

How can I set the location for all requests to, for example, New York? So, if a user asks for the weather without specifying the location, it'll default to New York.
It´s not that clear but I figure out that you must refer to the source for weather info (maybe an API) by previously checking if user has it´s location shared and then get from the source using the default location.
It looks like more a coding solution than a functionality for the Google Assistant.
Something like:
const LOCATION = user.location || 'New York';
requestMyAPI(LOCATION);

iOS. Create weblink to Google map from location

I picked location on my Google map. I want to create a link from it
How can I do it? I did not find any posts about it
I have latitude and longitude
I need a link like this: https://www.google.com/maps/place/XL+Center/#41.768399,-72.6794744,17z/data=!4m5!3m4!1s0x89e6549e9033c1df:0x2222bb5c74fa750c!8m2!3d41.768399!4d-72.679174
Well, if you just want a link of Location, then this thread can help you with that.
Here is a different way or option to get the link of Google Maps with address or location.
Place/Address
https://www.google.com/maps/place/760+West+Genesee+Street+Syracuse+NY+13204
Directions (with or without starting point)
https://www.google.com/maps/dir/760+West+Genesee+Street+Syracuse+NY+13204/314+Avery+Avenue+Syracuse+NY+13204 >
https://www.google.com/maps/dir//760+West+Genesee+Street+Syracuse+NY+13204
Directions (detect user’s current location as starting point)
https://www.google.com/maps/dir/Current+Location/760+West+Genesee+Street+Syracuse+NY+13204
Directions (with latitude / longitude coordinates)
https://www.google.com/maps/dir/Current+Location/43.12345,-76.12345 - Directions (multiple destinations from set location)
https://www.google.com/maps/dir/760+W+Genesee+St+Syracuse+NY+13204/314+Avery+Ave+Syracuse+NY+13204/9090+Destiny+USA+Dr+Syracuse+NY+13204
Query Search
https://www.google.com/maps/search/food/43.12345,-76.12345,14z
Destination Query
https://www.google.com/maps/dir/Current+Location/Pinckney+Hugo+Group
Linking to Google Street View
http://maps.google.com/maps?layer=c&cbll=43.053522,-76.165687
For more information, check also these link and thread.

Rails 4 - How would I automatically detect a user's location and display it on the web app?

I currently have a working app and I would like to have Rails detect a visitor's location by the IP address and display the city and state on the homepage of my website. For example, it would display "Hello {Name} from City, State".
Visitors do not have to enter anything. I'm aware of things like GeoIP and Geocode. As far as I know about them, they are used to search for locations from IP or vice versa but they require manually inputting the info.
I need it to do it automatically as soon as the user visits my homepage. I have a Post Controller and a home page, and I just want to add some code to my home page's HAML to display the info. I plan to categorize user's posts based on location, which will be automatically filled in (I currently have a location field that user's must enter manually). If you can show me how to do that too, that would be great.
For a live example of what I'm needing, visit weather.com and you'll see your city (and the weather) on the homepage.
Additional info: I'm fairly new to Rails 4 (started 2 weeks ago) so please show me the simplest way and point me to video resources if possible.
Add to the gemfile
gem 'geocoder'
run bundle install and restart your server
Put <%= request.location.city %> in the view you want the city name to appear in.
There are lots of services that provide RESTful JSON APIs which will give you location data based on the IP address, for example: http://www.telize.com/
All you need to do is in your controller, catch the source of the HTTP request (Rack::Request) via request.env['REMOTE_ADDR'] and feed to the Geo API.
One more solution is to use ruby gem for Yandex locator (https://tech.yandex.ru/locator/). Yandex locator is a service that finds mobile devices in a region delineated by a circle. The service returns longitude, latitude and precision. https://github.com/sergey-chechaev/yandex_locator
client = YandexLocator::Client.new(api_key: 'api key', version: '1.0')
result = client.lookup(ip: { address_v4: '178.247.233.3' })
result.position
# => {"altitude"=>0.0, "altitude_precision"=>30.0, "latitude"=>41.00892639160156, "longitude"=>28.96711158752441, "precision"=>100000.0, "type"=>"ip"}

how to add location to video to be uploaded from iOS using Youtube API3.0.

i found this class GTLYouTubeGeoPoint from Youtube API 3.0. now i want to add Geo location to the video to be uploaded. any one have any idea how to do it?
The specific field that you need to set is videos.recordingDetails.location. It has subfields for latitude, longitude, and optionally elevation.
You should be able to set it in a similar manner to how you set the other fields in the video's metadata (e.g. videos.snippet.title, etc.). Be sure that you include "recordingDetails" in a comma-separated string for the part= parameter, along with "snippet" (and "status" if you're setting that too).

twitter search api no place returned

I am having a bit of trouble sifting through the twitter API. I am trying to search for tweets near a certain location and then see their exact (or approximate) geo coordinates. I understand the geo field is deprecated and now we are supposed to use the "place" field. Unfortunately when I use the following url: http://search.twitter.com/search.json?q=&geocode=30.1829,-97.832,10mi I get a bunch of responses with a location that matches the city of the geo coordinates, but geo: is null and there is no place field. Am I stuck with only having an accuracy up to city coordinates, or am I using the wrong search call?
Thanks in advance!
Remember, tweeting with a geo location is an opt-in process. Twitter will supply a feed from the area for all tweeters in that area, but only those who have opted to tweet their coordinates will show up with "geo" info.
Using q=here with your url it did return 1 tweet for me with "geo" info in this form (though likely it will have moved on down the timeline by the time you try...):
"geo":{"coordinates":[-33.9769,18.5080],"type":"Point"}
Every user has a user defined location set in their profile settings. Use this when users don't use geo-encoding.
You can obtain a list of all countries / states by country and do a simple clean-up operation on the dataset.
This gave me what I needed for location data and greatly enriched my output.

Resources