ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Don't show reply tweets with twitter_timeline ?

January 24, 2012 5:42am

Subscribe [3]
  • #1 / Jan 24, 2012 5:42am

    JamesBrighton

    146 posts

    Im using twitter_timeline to show tweets from my twitter account on my site. The problem is that I reply to a lot of other people’s tweets but I dont want these to be shown. How can I filter out tweets that are replies to other tweets?

    To clarify, I need tweets that start with @SomeUserName to be removed, but messages that mention users should be shown if they dont start with the username.

    Thanks

  • #2 / Jan 24, 2012 6:03am

    Andrew Fairlie

    126 posts

    I’m not familiar with this particular method. However “Tweet Line” on Devotee has this functionality and is very easy to integrate. That may be worth looking into.

  • #3 / Jan 24, 2012 6:32am

    JamesBrighton

    146 posts

    Ive updated my question. That module can remove all tweets with mentions of others users, but not just tweets that start with the mention. This is a standard way of replying more privately in twitter and this is the functionality I need. Thanks

  • #4 / Jan 24, 2012 7:04am

    Andrew Fairlie

    126 posts

    You could use PHP for this.

    if(substring("{tweet}",0,1) != '@')
     {
      // The tweet does not begin with @, probably not a reply so display it
      echo '{tweet}';
     }
  • #5 / Jan 25, 2012 9:06am

    JamesBrighton

    146 posts

    Does this mean I need to import a set number of tweets and then filter out the ones that start with ‘@’? The issue with this is that even if I set the number to something like 100 there is always the possibility that all of them will start with an ‘@’ and no tweets will be shown. Thanks

  • #6 / Jan 25, 2012 12:22pm

    Shane Eckert

    7174 posts

    Hello James,

    Thank you for posting your question on the ExpressionEngine forums.

    Thanks to Andrew as well for assisting.

    I searched high and low for a plugin that would do what you are trying to accomplish and I could not find one, but I did find someone who had the same desire you do. Remove tweets that start with @ because those are replies to conversations you want left out, but do not remove all the posts that use @ because you might be mentioning someone or they might be mentioning you.

    Take a look at this post, he takes you through what he did to accomplish this in a step by step fashion. I have not tried it but thought I would pass on the information.

    Does this seem like something you would like to try?

    Cheers!

  • #7 / Jan 25, 2012 12:55pm

    JamesBrighton

    146 posts

    Thanks for that link, I think it will work.

  • #8 / Jan 25, 2012 12:58pm

    Shane Eckert

    7174 posts

    Hello James,

    I am glad I could help. Thanks again for using the ExpressionEngine forums!

    Cheers!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases