What we're listening to:
Jared

The Album Leaf:
Into The Blue Again
Jeff

Paper Route:
Absence

Filtering the Twitter Widget

October 6th, 2010

While working on a product blog of ours, I wanted to display our recent tweets in the sidebar, but found that included a lot of extraneous @ replies that I didn’t want included in the stream.  I’m not sure it’s documented anywhere, but the official twitter widget does allow you to pass a variable called filters to do this.  Here’s how I implemented it:

 

On line 2 is where I added my filtering function, in this case all tweets that start with @, which are replies. Line 34 is where I pass the filter function to the twitter widget. Negatives indicates to the twitter script that I want it to remove all tweets that my filter function returns true for. If you wanted to do the reverse, just change ‘negatives’ to ‘positives’ and in this case, it would only show the @ replies in the stream.

  • Anonymous

    This is really a helpful post for all those who use Twitter. Especially those who get spammed with unwanted tweets…
    Paxos Villas

  • A Nuff

    Write code in San Diego. We need you here.

  • http://pulse.yahoo.com/_77GX5HYJQXYP7GGDTKIOH72T6Q Zhang

    When the city of Exhaust System was incorporated in 1833, it was part of Monroe County instead of the state of Control Arm. For the time that Toledo was part of Brake Disc, it surpassed Monroe in terms of Baby Safety Seat and population. In 2005, it remained the leader in these two segments in the domestic Release Bearing, with a 60% share of the wheel market and a 71% share of the chassis Wiring Harness.

  • http://www.gasgoo.com/auto-products/hvac-parts-347/ zhanglijue
  • http://www.gasgoo.com/auto-products/hvac-parts-347/ zhanglijue

    Safety Buckle

    tuxin_tuxin@yahoo.com

    http://www.gasgoo.com/auto-products/safety-belts-buckle-426/

    At the first level of control in all nuclear reactors, a process of Car Mould
    emission by a number of neutron-rich fission isotopes is an important physical process. These delayed neutrons account for about 0.65% of the total neutrons produced in fission, with the remainder (termed “prompt neutrons”) released immediately upon fission. The fission products which produce delayed neutrons have half lives for their decay by Braking System
    that range from milliseconds to as long as several minutes. Keeping the reactor in the zone of chain-reactivity where delayed neutrons are necessary to achieve a critical mass state, allows time for mechanical devices or human operators to have time to control a auto equipment
    in “real time”; otherwise the time between achievement of car electricity
    and Drivetrain
    as a result of an exponential power surge from the normal nuclear chain reaction, would be too short to allow for intervention. This division manufactures steel wheels for trucks, buses and agricultural car material and complete chassis.

  • http://the-free.net/ Free

    What if we want to use 2 twitter widgets?

  • http://www.homelivingstyle.com/Modern_Vanities_s/1088.htm modern bath vanities

    Really excellent widget here with have excellent feedback.

  • http://www.paulsmithsale.uk.com/ paul smith uk

    abc123

  • http://www.whitelotusliving.com//pressure-cookers-for-canning-c214.html pressure cookers for canning

    Hi,
    well, unless you wanted two separate comment widgets, which, would be odd. Disqus also has Seesmic integration.

  • http://www.meadcollege.qld.edu.au/diploma/management/ diploma of management

    Ya!I am totally agree with this sharing.I have to import a blog with haloscan comments before the summer is over, so if nobody creates a tool to modify the importer, I’ll write one myself.

  • http://www.whitelotusliving.com//pressure-cookers-for-canning-c214.html pressure cookers for canning

    disqus is save my time, in the last time I always feeling unhappy, but now I can pour my words to everyone.