• Resolved Danny

    (@dannyairlie)


    Hi Martin,

    First of all, I love the plugin! It is the best plugin I have come across for working with the Twitter API.

    However, is there a way I can pull in tweets using geolcation i.e. tweets from USA only. I had come across a few different approaches in the search api documentation but was unsure of how to implement this using the plugin (shortcode).

    Any help would be greatly appreciated.

    Regards

    Danny

    https://wordpress.org/plugins/rotatingtweets/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Martin Tod

    (@mpntod)

    You need to use the search functionality.

    The simplest way to do this is to go to twitter.com/search-advanced and experiment until you find a search that gives you the results you want.

    You’ll end up with something like fish near:"United Kingdom" within:15mi
    which you can put into the widget or into your shortcode as

    search='fish near:"United Kingdom" within:15mi'

    Make sure that the quotes inside and outside your search are different!

    Thread Starter Danny

    (@dannyairlie)

    Hi Martin,

    I tried what you had suggested, however, I received the following error:

    Problem retrieving data from Twitter
    Twitter error code: 44 – near parameter is invalid.

    Regards

    Danny

    Thread Starter Danny

    (@dannyairlie)

    Hi Martin,

    I managed to get it working. The search operator “near” isn’t available in API as described here: https://dev.twitter.com/rest/public/search

    The solution was to use the geocode parameter as shown below:

    search='fish geocode:37.781157,-122.398720,1mi'

    Thanks for your help 🙂 and a great plugin

    Regards

    Danny

    Thread Starter Danny

    (@dannyairlie)

    Resolved!

    Plugin Author Martin Tod

    (@mpntod)

    Thank you! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Geolocation?’ is closed to new replies.