15.4: Twitter API Basics – Twitter Bot Tutorial

[ad_1]
This video covers the basics of the twitter API. What are the basic commands — get, post, stream? How do you search twitter? How do you post a tweet? How do you trigger a function callback when a twitter event occurs?

All examples:

Twit package:

Twitter API documentation:

Contact:

Next video:

Learn JavaScript basics:

Learn Processing basics:

More about data and APIs:

Help us caption & translate this video!


Posted

in

by

Tags:

Comments

45 responses to “15.4: Twitter API Basics – Twitter Bot Tutorial”

  1. Lona Fernandes Avatar

    @the coding train can you make a tutorial for ruby in rpg maker xp

  2. The Shroud Avatar

    /how did you learn all this? At this point I just expect you to ignore as per usual…

  3. Prakad Alpha Avatar

    access token error 89 is occuring
    { errors: [ { code: 89, message: 'Invalid or expired token.' } ] }
    2017/8/11

  4. Darius Avatar

    Does the api work with Python?

  5. mandy1339 Avatar

    The Coding Train. I love your videos. I have learned so much. Thank you!!!!

  6. ENXJ Avatar

    Keep politics out of science and technology, nerd. I came here to learn.

  7. foox2k Avatar

    Error

    the bot is starting
    /home/ubuntu/workspace/prueba/bot2.js:6
    var T = new Twit(config);
    ^

    ReferenceError: Twit is not defined
    at Object.<anonymous> (/home/ubuntu/workspace/prueba/bot2.js:6:13)

  8. foox2k Avatar

    $ node bot.js
    /home/ubuntu/workspace/proyecto/bot/bot.js:18
    });
    ^

    SyntaxError: Unexpected token )
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:990:3

    Please help me

  9. Cyrus Besabella Avatar

    im getting code: 215, message: 'Bad Authentication data.', i think you cant call anymore using your local machine?

  10. Yasaa Moin Avatar

    the awkwardness makes the learning experience real fun

  11. Aditya Nelakonda Avatar

    Apology trump working overtime lmao. Good video

  12. Lank Asif Avatar

    You had no way of knowing how relevant that Trump reference would be today!!! LMFAO!!

  13. tushar bansal Avatar

    I am getting this error: { errors: [ { code: 89, message: 'Invalid or expired token.' } ] }
    can anybody help?

  14. Ahmad Hijjawi Avatar

    thanks. really very interesting teaching approach very deliverable

  15. D POSITIVE Avatar

    how can I do this on Netbean ? thanks.

  16. Michael Pimentel Jr Avatar

    looks like twit lib is no longer being maintained. should I use a different one?

  17. YouSuck Avatar

    I know this is old, but I keep getting this error.
    { errors: [ { message: 'Sorry, that page does not exist', code: 34 } ] }

  18. Sithembiso Mkhize Avatar

    wonderful set of tutorials… so is there a way of creating a bot that analyses all the people you follow and then 5 to 10 of their most liked / retweeted (interacted with) Tweets… ?

  19. Aldo Prakoso Avatar

    Hi Daniel, can you help me to face this error?

    { errors: [ { code: 215, message: 'Bad Authentication data.' } ] }

    thanks!

  20. Nick Muscara Avatar

    "in two years, is anyone gonna care about trump? no" Loudest sigh of my life

  21. Subtr3y Avatar

    Can you do the same for instagram??

  22. Den M Avatar

    Thanks, I will use this for my CST120 class

  23. jozef valverde Avatar

    I love your videos man!!!
    Cheers!! from Perú

  24. Fullstack Devs Avatar

    you know what would be really cool… to make a bot that likes and replies to people using AI, give it a teenage girls mind lol, i would love to see that.

  25. Jim van Hazendonk Avatar

    hope your trump apology bot doesn't get overworked 🙂
    Great tutorial by the way. helped me a lot understanding the twitter api better

  26. maria benedict Avatar

    I have made a get() twitter bot based on a keyword but the tweets I am getting back are truncated, is there anyway to fix this?? thank you!

  27. Engineer Passion Avatar

    dude please make a full course about JavaScript

  28. Engineer Passion Avatar

    can you learn us how to program a telegram bot API
    I think it's very useful cause there is no good video in YouTube teach about telegram bots in JavaScript

  29. Edgar Pan Avatar

    Good tutorial but too much distractions of laughing and unnecessary small talks/jokes.

  30. Joe Jones IV Avatar

    Writing from 100 years in the future. I know you think Trump was rough. Wait till you meet the first robot president.

  31. SIDDHARTH SINGH Avatar

    I get this error when i try to post/get anything

    { errors: [ { code: 215, message: 'Bad Authentication data.' } ] }

    is there a way to solve it.

  32. Up4lIFe Avatar

    spoiler alert "in 2017 trump is president"

  33. Rajat Rasal Avatar

    IT WORKED!!!!!!!!!!!! YOUR VIDEOS ARE AMAZING! Love your attitude and positivity – thanks dude!

  34. Ahadul Islam Avatar

    i want to make a plugin twitter plugin for wordpress. So do i need to Authenticate every time for searching a defferent tweet. And because the plugin will be used in different url's, what i should do when assigning a new application in my twitter dev account.

  35. Nasruddin Shah Avatar

    wow wow wow… awesome…

  36. Ezequias Dickens Avatar

    I am considering to not use this API just because of this liberal coding teacher.

  37. Chris Beldam Avatar

    So did he cover streaming? I can't seem to find it anywhere in this video?

  38. Siddharth Gupta Avatar

    can you please help me out with this, idk what is wrong here

    TypeError: Cannot read property 'length' of undefined
    at gotData (C:usersquestdesktoptweeterbotbot.js:17:29)
    at C:usersquestdesktoptweeterbotnode_modulestwitlibtwitter.js:118:13
    at onRequestComplete (C:usersquestdesktoptweeterbotnode_modulestwitlibtwitter.js:324:7)
    at Request.<anonymous> (C:usersquestdesktoptweeterbotnode_modulestwitlibtwitter.js:341:7)
    at emitOne (events.js:101:20)
    at Request.emit (events.js:188:7)
    at Gunzip.<anonymous> (C:usersquestdesktoptweeterbotnode_modulesrequestrequest.js:1001:12)
    at Gunzip.g (events.js:291:16)
    at emitNone (events.js:91:20)
    at Gunzip.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

  39. Sheilfer Zepeda Avatar

    I don't use Twitter but my girlfriend loves it. It was a really really awesome feeling being able to send her a tweet from code. Im not sure how to describe but it felt really freaking cool. Thanks a lot for the knowledge Mr. Shiffman

  40. Proletaryo Avatar

    Trump apology tweet bot is still relevant though.

  41. Brett Kessler Avatar

    Thanks for the videos!

  42. Gamescept Avatar

    He didn't see it coming when saying: "in two years, nobody will care about Trump"…

Leave a Reply

Your email address will not be published. Required fields are marked *