Ah, I figured out the filters feature of the "new" Widget (2.0).  To
filter in "#news" just add this code to the features part:

filters: {
      positives: /#news/
    }

So easy!  Thanks again.
Jason



On Jun 29, 3:51 pm, jcorso <[email protected]> wrote:
> Thank you for your reply.
>
> Indeed, one thing I had tried before posting was your first
> suggestion:
> w.setUser(--).setSearch(--).start()
> But, this does not work for me.  (Can't parse the javascript code in
> detail to figure out why not...)
>
> I will take a look at the REST API instead.  If you have an example,
> that would be quite helpful...
>
> Best,
> Jason
>
> On Jun 29, 2:44 pm, Tim Meadowcroft <[email protected]> wrote:
>
>
>
>
>
>
>
> > On Wednesday, June 29, 2011 6:56:52 PM UTC+1, jcorso wrote:
>
> > > I am using a the Twitter widget in 'profile' mode to display news and
> > > events on my website.  (Twitter user is @ProfJasonCorso and the url is
> > >http://www.cse.buffalo.edu/~jcorso)  However, I would like to filter
> > > the tweets that are displayed in the widget to only those containing
> > > the hashtags #news or #events.  I cannot figure out how to use the
> > > 'filters' feature of the widget (even after reading the widget.js with
> > > my somewhat outdated knowledge of javascript) and cannot find any
> > > documentation or examples about it.  Nor can I find another way of
> > > doing it.
>
> > The basic "test it out" pages athttp://twitter.com/about/resources/widgets
> > are handy for trying out various features, and will then show the code you
> > need.
> > And I take it you've got the documented un-minified source of the widget
> > code from
>
> >  http://twitter.com/javascripts/widgets/widget.js
>
> > to look at .
>
> > > Note, I think the 'profile' mode is appropriate rather than the
> > > 'search' mode because I believe Twitter only indexes recent tweets for
> > > search and I need all of them to appear.
>
> > The setUser() call seems to call setSearch(" "), so if you want to
> > experiment combining them, I'd do something like
>
> >   w.setUser('ProfJasonCorso').setSearch("#news").start()
>
> > but personally, I use the REST API to pull in the tweets and then filter
> > them as I want, and then poke beneath the covers of the widget to give it a
> > list of tweets to display (rather than letting it fetch them itself).
>
> > So if you want to look at that as an option, the way you can do it with the
> > current widget code is to call
>
> >   w._prePlay(tweets);
> >   w._play();
>
> > instead of start()
>
> > --
> > Tim

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk

Reply via email to