Search code examples
javascripttwitter

trying to eliminate replies and retweets in the twitter widget


I am trying to eliminate replies and retweets in the twitter widget. So far the following code is not working:

Starting at line 1967 of widget.js:

var F = /twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,
    A = {
      tweet: true,
      retweet: false,
      reply:false,
      favorite: true
},

And this code in the body of the html page, likewise is not working:

<script type="text/javascript">

new TWTR.Widget({
  version: 2,
  type: 'search',
  search: 'blahblahblah', // This shows all tweets with the hashtag #blahblahblah.
  interval: 3000,
  title: '',
  subject: '',
  width: 'auto',
  height: 544,
  theme: {
    shell: {
    background: '#cccccc',
    color: '#ffffff'
    },
    tweets: {
    background: '#ffffff',
    color: '#5e6a71',
    links: '#aa0828',
    reply:false,
    retweet:false
    }
  },
  features: {
    scrollbar: false,
    loop: true,
    live: true,
    hashtags: true,
    timestamp: true,
    avatars: true,
    behavior: 'default'
  }
}).render().start();

</script>

Any help in this would be greatly appreciated.


Solution

  • I figured it out. In the search widget just set the search parameter like so:

    search: 'from:@blahblahblah',

    This limits the search query to only those tweets from the specific user. I hope this helps anyone who runs into this issue.