tags:

views:

43

answers:

1

Also, how can i retrieve the results of the s hashtag search and see who all have retweeted that tweet in php. I have seen the api but did not find much info on hashtag search. did find other normal search but i wanted to search based on hashtag.

Suggestions please

A: 

Just include the hash when searching for the tag, i.e, #tagname

Make sure you also urlencode the search term, otherwise the # will be intepreted as an anchor and not part of the querystring. Example code:

<?php
$tag = '#apple';
$url = 'http://search.twitter.com/search.atom?q=' . urlencode($tag);
echo $url;
?>

This will output:

http://search.twitter.com/search.atom?q=%23apple
Emil Vikström
i think you understood me wrong... i am not trying to search in twitter.com website. I am trying to make it automatically work as a script. Here is a sample code from twitter api... `http://search.twitter.com/search.atom?q=#apple` This is not working.But what works in `http://search.twitter.com/search.atom?q=apple`
Scorpion King
I've updated my answer corresponding to your new information.
Emil Vikström
Thanks Emil. How can i show the content of this url on my php webpage. Alos i can see that .atom is retrieving only 20 tweets.. how can i show all of them at one place?
Scorpion King
What i want to do is to show the list of all users, on my webpage, who have used this hashtag in their statues. There is also json version, but i do not understand how to grab the output of this link and show only the user_name user_id and full name on my webpage.
Scorpion King
I don't know how to get more results. It's probably in the API documentation.
Emil Vikström