Interact with Tweets with Twit.js

InstructorHannah Davis

Share this video with your friends

Send Tweet

We’ll learn the basics of interacting with tweets, including retweeting, deleting, favoriting, and replying to tweets. We'll get our home timeline by using Twit's GET method to access the statuses/home_timeline endpoint, including the count parameter, which lets us get back a certain number of tweets. We'll also pass it a callback. We'll learn how to cycle through the data (the tweets) we get back and see what information is included. We'll learn how to retweet statuses by posting to statuses/retweet and including the tweet id. We can unretweet by posting to statuses/unretweet with the same tweet id. We'll also learn how to like a tweet by posting to favorites/create with a tweet id, and unlike a tweet by posting to favorites/destroy with a tweet id. We'll also learn how to reply to a tweet by posting to statuses/update, with a status that includes the handle of the user we're replying to and in_reply_to_status_id parameter, which is the id of the tweet we're replying to. We'll learn how to delete a tweet by posting to statuses/destroy with the tweet's id.