Pages

Friday, March 13, 2020

Searching Twitter tweets by location

Bot Libre allows to you connect your bot with a Twitter account. This allows you to automate interactions with your community, or automate the posting of information. For a tutorial on creating a Twitter bot see:

https://www.botlibre.com/forum-post?id=5015

Always ensure you comply with Twitter's terms of service and automation rules,

https://help.twitter.com/en/rules-and-policies/twitter-automation

Bot Libre's Twitter integration includes support for auto replies to mentions or direct messages to your bot, auto retweeting, Tweet search, auto replies, and auto posts.  The Tweet search feature allows your bot to search for tweets on Twitter to process with its rules.

In your bot's Admin Console on its Twitter page you can configure your Twitter bot's rules. One option is the "Tweet Search", this allows you to enter multiple Twitter search queries (each on a new line).  A Twitter search can contain a list of keywords, but can also include many other commands, for a full list see,

https://twitter.com/search-advanced

One option is geo location. This lets you search tweets by location.

For example to queries all tweets on the #chatbots hashtag in the USA you can use:

#chatbots geocode:39.8,-95.583068847656,2500km

To use geocode you need to know the coordinate of the city or location you are interested in. Here is a good website to get the coordinates for a place:

https://www.latlong.net/

For more geo location examples see:

http://thoughtfaucet.com/search-twitter-by-location/examples/

No comments:

Post a Comment