How can I pull a search-result, rather than tweets from a spesific user?

I wan't to show our readers all tweets that mention us, so I want to search for the phrase @journalisten

Can anyone pls help me with the proper php-code?

Comments

arithmetric’s picture

Title: Pulling a search-result » Getting tweets that mention a user (and other possibilities)
Status: Active » Closed (works as designed)

In general, for the Twitter key in twitter_pull_render(), you can use a Twitter search query with operators as described here:
http://search.twitter.com/operators

The exception is that if the Twitter key starts with @, then it gets the tweets from that user instead of tweets mentioning that user.

A simple workaround to get tweets mentioning a user is to add a space before the @. For example, to get tweets mentioning @drupal, try:

<?php echo twitter_pull_render(' @drupal'); ?>

To get tweets either using #drupal or mentioning @drupal, you could use:

<?php echo twitter_pull_render('#drupal OR @drupal'); ?>

Hope that helps!

espenmoe’s picture

I'm so sorry I missed your post on april 1th, but that entire day I spent in Disneyland Tokyo.

What can I say? Your answer is just fixing my issue 100%.

Thx a LOT!

espenmoe’s picture

Check it out here:
http://beta.journalisten.no/node/32022

Pulls all tweets mentioning our account.

BenK’s picture

Subscribing... very handy info.