How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Cory Your Own Question
Cory
Cory, Computer Technician
Category: Programming
Satisfied Customers: 3447
Experience:  Computer Repair Technician 5+ Years
8685120
Type Your Programming Question Here...
Cory is online now

How do I know if twitter user on line ?

Customer Question

how do I know if twitter user on line ?
Submitted: 1 year ago.
Category: Programming
Expert:  Cory replied 1 year ago.
Welcome, I am Cory. While there is not a way to tell if they are online, you would have to the the users account for tweets, re-tweets, favorites and other tools that can be used on the twitter platform. If you have any questions, please let me know.
Customer: replied 1 year ago.
but , see what an other programmer said:Although this information is not readily available, you can do a work around. Make use of Twitter's Streaming API: https://dev.twitter.com/docs/streaming-apis/streams/public (have a read through this document).You'll most likely be using the POST Statuses/filter functionality (read the doc here: https://dev.twitter.com/docs/api/1/post/statuses/filter ), which will give you a JSON object with tweets based on your filters.Make use of the parameters you'll need to specify in the URL to filter the stream (have a look through this document to learn more about it: https://dev.twitter.com/docs/streaming-apis/parameters ), in your case it'll be the follow parameter. You basically specify the twitter ID of the user you want to follow. Here's a sample JSON result of the streaming API in action https://stream.twitter.com/1/statuses/filter.json?follow=25365536 - this one in particular is following Kim Kardashian. Keep in mind that this will give you:Tweets created by the user.
Tweets which are retweeted by the user.
Replies to any Tweet created by the user.
Retweets of any Tweet created by the user.
So in order to just stream the tweets of your desired user, you'll have to use a programming language of your choice to parse through the JSON object to find the user that actually sent the tweet (this is a little tricky, you'll have to look through the properties of the JSON object to figure it out). Once you narrow the streaming tweets to just the ones from the user though, you can then have an alert on when new tweets by this user stream and that will tell you if the user is online/using twitter at the moment.
Expert:  Cory replied 1 year ago.
That is what I am saying. It is not like Facebook with a Chat/Online light. You can only find out of they post, retweet, reply or favorite something. If not, they could be online for days and you would never know.
Expert:  Cory replied 1 year ago.
Please remember to rate my answer for assisting you today.

Related Programming Questions