WordPress.org

Ready to get started?Download WordPress

Forums

Rotating Tweets (Twitter widget and shortcode)
[resolved] Show only hash tag specific tweets (14 posts)

  1. kelly.leff
    Member
    Posted 6 months ago #

    I would like to only show tweets that I have labeled with a specific hash tag from my feed. Is that possible?

    Thanks!

    http://wordpress.org/plugins/rotatingtweets/

  2. Martin Tod
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Kelly,

    If you select search in the widget and search for:

    from:account #hashtag

    that should work for you.

    Please let me know if there is a problem.

    Best wishes,

    Martin

  3. kelly.leff
    Member
    Posted 6 months ago #

    Thanks for getting back to me. I did exactly what you said and now the widget says it rotates between "Can't retrieve twitter data" and "No search results for from:account #excellenceinlaundry."

    Thanks for your help!

  4. Martin Tod
    Member
    Plugin Author

    Posted 6 months ago #

    Apologies. You need to substitute the account name.

    Try something like:

    from:CoinLaundryAssn #excellenceinlaundry

    Best wishes,

    Martin

  5. Martin Tod
    Member
    Plugin Author

    Posted 6 months ago #

    Does this solve your problem?

  6. bigfishdesign
    Member
    Posted 4 months ago #

    When I use similar criteria for searching with Rotating Tweets, I am only able to retrieve the first tweet that matches the criteria. However, when I search on twitter.com using the same criteria, I see the full list of search results.

    Has anyone else experienced this? Is there a resolution?

    Thanks.

  7. Martin Tod
    Member
    Plugin Author

    Posted 4 months ago #

    That's odd. Is that true for all searches that you do?

    What happens if you try it with a trending hashtag?

    Is there only one tweet showing up in the HTML? Or is the problem that there is more than one tweet but they are not rotating?

  8. bigfishdesign
    Member
    Posted 4 months ago #

    If I use just one search criteria (e.g. just from: or just the hashtag), I get all of the tweets that match the criteria. It's only when I combine the two that I experience this issue.

    When inspecting the DOM element, I only see the one tweet written into the HTML code.

    Thanks.

  9. Martin Tod
    Member
    Plugin Author

    Posted 4 months ago #

    AIUI, the search used by the API is different from the one on the website.

    What happens if you try a search with a lot of results (such as from:CoinLaundryAssn #excellenceinlaundry) or plenty of recent results (such as from:PHE_uk #sharelistenact)?

    Martin

  10. Martin Tod
    Member
    Plugin Author

    Posted 4 months ago #

    Another option might be to comment back in line 993 (in the development version):

    $apioptions['result_type']='recent';
  11. bigfishdesign
    Member
    Posted 4 months ago #

    Using "from:CoinLaundryAssn #excellenceinlaundry" returns 2 tweets.

    Using "from:PHE_uk #sharelistenact" returns the 5 most recent.

    Won't the inclusion of the code on line 993 also limit the results?

  12. Martin Tod
    Member
    Plugin Author

    Posted 4 months ago #

    That suggests we have an API problem - since RT can receive more than 1 tweet and also display them.

    One idea might be to increase 'count'=>40 to 80 in this line (around 990):

    $apioptions = array('screen_name'=>$tw_screen_name,'include_entities'=>1,'count'=>40,'include_rts'=>$tw_include_rts,'exclude_replies'=>$tw_exclude_replies);

    Alternatively, replace:

    $apioptions['result_type']='recent';

    with

    $apioptions['result_type']='mixed';

    or

    $apioptions['result_type']='popular';

    just to see what happens...

  13. bigfishdesign
    Member
    Posted 4 months ago #

    I tried all of these suggestions, but I saw the same results as before. I did some poking around and it appears that the tweets available to the API only go back so far. So, no matter how the parameters are set, if tweets that should match the search criteria are older than the timeframe that Twitter deems suitable, then they will never show up via the API.

    Thanks for your help.

  14. Martin Tod
    Member
    Plugin Author

    Posted 4 months ago #

    I feared that might be the case. Sorry about that.

    This suggests there's not going to be an easy solution.

    The only solution I can think of would be incremental storage of particular search results - but that would be tricky - and would take time to solve the problem. Currently RT overwrites the previous download every time it gets new tweets. This would mean that if a search was small (i.e. 1-3 tweets), it would add it to the previous search rather than just replacing it.

    Martin

Reply

You must log in to post.

About this Plugin

About this Topic