Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geocode #36

Open
Fot3k opened this issue Mar 23, 2018 · 3 comments
Open

Geocode #36

Fot3k opened this issue Mar 23, 2018 · 3 comments
Assignees
Labels

Comments

@Fot3k
Copy link

Fot3k commented Mar 23, 2018

Just started using your bot, nice work, like the features!

Can't seem to get the geocode to work, unless it's Twitter side. I am trying to focus searches for just the UK which I have the correct settings for but brings no results.

Am I right in thinking twitter profiles need to have location set for this to work? Most large companies do have this set so I am a little confused.

Thanks.

@raulrene raulrene reopened this Mar 27, 2018
@raulrene
Copy link
Owner

raulrene commented Mar 27, 2018

I just checked the code and it appears to correctly append the geocode. Most probably because of the spaces in it it wasn't correctly taking it into account. I've done a small fix, theoretically it should work.

Also make sure to correctly set the geocode in the form of lat long radius_in_miles, like 37.781157 -122.398720 1mi.

@Ka0tiK can you check to see if it works now? Make sure to update before. Thanks!

P.S. Yes, the account should have the location set. If not, the API can't filter it by geocode.

@raulrene raulrene self-assigned this Mar 27, 2018
@raulrene raulrene added the bug label Mar 27, 2018
@Fot3k
Copy link
Author

Fot3k commented Mar 28, 2018

Still not working correctly. I did manage to find 1 tweet though and that was by using the format:

37.781157,-122.398720,1mi

According to my research tweets based on location will only be found quite obviously only if the account has location enabled on their device or have location entered into their profile. Still, this should bring far more results than one tweet as I can find them manually without issues.

Changing the radius from 1mi all the way up to 2500mi makes no difference, 250mi is my preferred choice. No other settings have been changed from default other than my twitter app credentials.

Thanks for the update!

@raulrene
Copy link
Owner

raulrene commented Apr 4, 2018

Hi again @Ka0tiK ,
I've been looking for the past 20 minutes and I could indeed find that since 2014 there were several issues with the geocode searching. Some report that it worked for values like 5mi but failed for 15mi, which should theoretically include that.

However, I can't seem to find whether this is still an existing issue or not. Someone also specified that Tweets have to be manually geo-located, although their Search API states that

The location is preferentially taking from the Geotagging API, but will fall back to their Twitter profile

The format used for calling seems to be the one suggested by them, although I found some using: 43.913723261972855,-72.54272478125,150km (commas instead of spaces).

Could you also try this geocode format? If this also fails to work I'll have to guess it's either the Twitter API or their Profile settings, as we're calling their API properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants