1

I am using https://api.twitter.com/1.1/search/tweets.json?q=' . $_POST['keyword'] . ' to get the tweets of searched keyword.

I am able to get till 100 tweets but i need to display full 3,200 tweets. how can i do with this? how to get video from the tweets?

  • Twitter Only allow specific no. of tweets through its API i-e max 100. To get more than that in one hit you need to go for twitter Partnership program. Also to get videos in tweets please see this https://dev.twitter.com/overview/api/entities-in-twitter-objects#extended_entities – planet260 Apr 01 '15 at 12:41
  • But to get more than 100 you can do it indirectly http://stackoverflow.com/a/17888091/1734707 – planet260 Apr 01 '15 at 12:44

1 Answers1

2

For videos, Twitter still working on this and for time being video results are not coming in "Search API". We can track this here(see at few last comments): https://twittercommunity.com/t/twitter-video-support-in-rest-and-streaming-api/31258/38

For more than 100 tweets, you can call API for next tweets as per below:

  1. Find the the highest id(data[data.length - 1].id) in the twitter results that you just retrieved with your query
  2. perform the same query with the "since_id" option set to the id you just found.

Ex: https://api.twitter.com/1.1/search/tweets.json?q=nature&since_id=602821207268921300

Sandeep
  • 1,028
  • 2
  • 13
  • 25