Combining multiple Twitter user timelines into one request - php

I am relatively new to the twitter API so the question might seem foolish but please help me out.
I am trying to get tweets from user's timeline using their API, which I know is possible.
Now the issue is I have to get tweets from multiple users (combining upto 30-40 users) timelines into one API request. How can I do this?
Would the streaming API help? I couldn't make heads or tail of it.

You can add those users to a list and pull the timeline for the list.

Related

How to get all tweets of given username ( in PHP)

I already got 3200 tweets using API v1.1 but I need all the tweets so I also used cron job as background process but it didn't increase the tweets .
Please suggest me if any way possible either scraping or using API.
The best way getting Tweets is API. For me, I'm using twitteroauth. I don't understand how to get all tweet of users. Twitter does not let to get tweet more than 200. So you can get 200 tweets per query for one user.
You can create a listener or cronjob for getting last tweets. If you create a listener, when any user send tweets you get simply.

Twitter API Get Only User Tweet

I am using Twitter's API to retrieve user tweets (via screen name). However this is returning all "retweets" and random replies to other twitter users. I've been searching through Twitter's API to find a way to ONLY pull back the tweets instead of both tweet & reply but can not find a good solution. Could anyone lend a hand?
Thank you.
Have a look at this doc. Simply add parameters
exclude_replies=true & include_rts=false
along with your query. This will filter the retweets and replies!

Twitter Streaming API

I want to use Twitter's Streaming API to collect all of the tweets of users signed onto my website - of course I would have an oauth token and secret for them, but I want to store their tweets as they make them. Is that possible with the Streaming API? If so, can anyone point me to some PHP library that will help me implement such a task? I tried looking in to Phirehose, but I don't understand how to use that library to get the feeds of all the users signed up on my website. Any help would be greatly appreciated.
Take a look at the 140 Twitter Server.
Adam creates a lot of great helper code around the twitter API, a lot of great articles too.

Get all followers of user on twitter

I am using twitter application in mywebsite.
I am using followers api of twitter.
I want to see all followers of particular user.
but it shows only 100 followers.I want to see all followers.
Please help me how can fetch all followers of user
might find answer here: Twitter API: Get Followers +99
There are several useful videos you can watch. Check out this one for example:
https://www.youtube.com/watch?v=g0a6EXGLxVY
or search for "twitter harvesting or scraping".
There are also several services and tools. However I would not buy a tool. Its not worth it if you dont harvest regularly But maybe give those a shot, they seem fairly reasonable with their price:
http://myhelpster.com/scrape-twitter-followers-any-account/

Max. Requests Twitter

I wanted to use the Twitter API to get the friends status list from many users.
How many requests could I request in one moment?
Little another question:
What's faster: XML or JSON with a lot of data with PHP?
Currently, there is a rate limit of 350 requests per hour when using OAuth. I believe it's 150 when using Basic Auth which will be deprecated in June.
The number of requests per hour over REST is irrelevant here as to achieve what you require (tracking the friends of many users I assume) then you need to be using site streams rather than the REST API. This will give you an initial list of friends for a followed user then will stream you updates to that user as any changes happen.

Categories