15.5: Scheduling Tweets Using setInterval() - Twitter Bot Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ส.ค. 2024
  • How do you schedule tweets in a bot using JavaScript's setInterval() function? How do you trigger a tweet when a certain event occurs like a user is followed or a tweet is favorited?
    All examples: github.com/shi...
    Twit package: github.com/tte...
    Twitter API documentation: dev.
    Twitter automation rules and best practices: support.twitte...
    Contact: / shiffman
    Next video:
    • 15.6: Tweeting images ...
    Learn JavaScript basics:
    • Start learning here!
    Learn Processing basics:
    www.youtube.co...
    More about data and APIs:
    • 10: Working with data ...
    Help us caption & translate this video!
    amara.org/v/Qbtn/
    📄 Code of Conduct: github.com/Cod...

ความคิดเห็น • 168

  • @matinakbari9328
    @matinakbari9328 4 ปีที่แล้ว +4

    Wow I cant believe someone literally enjoys teaching like that!
    Its 4 AM and Im stuck in thease videos.

  • @santhoshjallu926
    @santhoshjallu926 4 ปีที่แล้ว +9

    If you're using this now the twitter removed the user endpoint so T.stream("user") doesn't work use var stream = T.stream('statuses/filter', { track: '@' }); instead.

    • @saitejaballa6759
      @saitejaballa6759 3 ปีที่แล้ว

      Does the "your_twitter_username" Refers to the bot username?

    • @santhoshjallu926
      @santhoshjallu926 3 ปีที่แล้ว

      @@saitejaballa6759 yes

    • @Samuel-eg5wc
      @Samuel-eg5wc ปีที่แล้ว

      thsis deosn't work either. do i have to change something else aswell?

  • @illshootyou5199
    @illshootyou5199 7 ปีที่แล้ว +11

    Hey Daniel! Just came across this video series and has helped me setup and run a local node server to pull the current spot rate from my power company API so I can use it to calculate the cost of power via an IoT device power meter I created... speaking of which I would love to see a series on Arduino! Cheers for making me smarter... 4 days ago I had never written a word of JS! From New Zealand! Chur bro

    • @jayfiled
      @jayfiled 6 ปีที่แล้ว

      I'll Shoot You nice work man! What's the device you set up? I'm interested.

  • @raviutsav6644
    @raviutsav6644 3 ปีที่แล้ว

    After watching this, I made a Motivation Quote Bot, which will tweet a motivation quote every 24 hours.
    Thank you so much!

  • @bonnieb9995
    @bonnieb9995 8 ปีที่แล้ว +1

    As always very well explained! The bit I found most useful was when you opened up the twitter page and put everything into context - cheers for that!

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว +1

      Thank you for the nice feedback!

  • @damiamquimtana573
    @damiamquimtana573 4 ปีที่แล้ว +1

    You are amazing, i love your explanations they feel so warm or i don't know how to say it but it feels like i'm in a conversation in which i'm learning

  • @beingadityak
    @beingadityak 7 ปีที่แล้ว +30

    I have implemented this idea: a small joke bot in twitter that posts a joke every 1 hour.

    • @shivamparashar641
      @shivamparashar641 6 ปีที่แล้ว

      How did you do that, did you manually inserted each joke in a variable and passed it inside the post() or something else. I need the answer ?

    • @TheGBsXB
      @TheGBsXB 6 ปีที่แล้ว +4

      Shivam parashar use an array of string jokes and increment its index for each post, or look for a random jokes API and connect it to your bot so you can get new jokes each time your bot's posts.

    • @indiekoder1791
      @indiekoder1791 4 ปีที่แล้ว

      @@shivamparashar641 you can use an api which can generate random jokes for you
      github.com/bluekandil/Javascript_twitterBot/blob/master/bot.js

  • @furrane
    @furrane 8 ปีที่แล้ว +12

    That moment when you need to try the follow event but you got no friends :'( Haha great video again =)

  • @ridilatrois7991
    @ridilatrois7991 6 ปีที่แล้ว +1

    For indent, you can go to Preferences -> Settings. And then you make another property like that: "tab_size": 2

  • @ramseybeing
    @ramseybeing 5 ปีที่แล้ว +2

    If you are watching this now, the Stream() function is now obsolete and will not work. Instead, use the Account Activity API, it's a premium service but you can use it for free to test in the Sandbox. Find more info for in the twitter documentation by searching Account Activity API.

  • @clauderoy419
    @clauderoy419 7 ปีที่แล้ว +3

    Truly amazing video, you are really entertaining and clear in your explanation :)

  • @ctckevinctc
    @ctckevinctc 7 ปีที่แล้ว

    I am planning to learn AWS Lambda! Thanks for teaching the most wonderful node.js class.

  • @srivatsascs
    @srivatsascs 5 ปีที่แล้ว +4

    I believe the stream portion is no longer applicable in 2019 as certain things have been deprecated.

    • @UltraGamingUnion
      @UltraGamingUnion 4 ปีที่แล้ว

      the exact problem I ran into and only found out certain things were discontinued on the API

  • @BarbarosYurttagul
    @BarbarosYurttagul 7 ปีที่แล้ว

    Hello Daniel,
    in follow event, I see that; if I-me-myself follow a user, my bot works again. For example; my screen name in twitter is @BarbarosYrttgl. If I follow someone, tweetIt( ) function works and it says '.@BarbarosYrttgl thanks for following'. So, for the solution I recommend;
    function followed(eventMsg) {
    var name = eventMsg.source.name
    var screen_name = eventMsg.source.screen_name
    //id_str is your twitter account id
    if (eventMsg.source.id_str !== 'your_twitter_account_id_here') {
    tweetIt('.@' + screen_name + ' thanks for following')
    }
    }
    Great tutorial:)Thanks.

  • @dfhfdgfgdfshdfhe8257
    @dfhfdgfgdfshdfhe8257 7 ปีที่แล้ว +12

    use command+k instead of clear to clear the terminal Dan! try it.

  • @CherissD
    @CherissD 8 ปีที่แล้ว

    Your videos are really great. Thank you so much for making them!

  • @xxXXCarbon6XXxx
    @xxXXCarbon6XXxx 7 ปีที่แล้ว +4

    I made a Tweeting Cat's bowl with an Arduino. it posted when the cat's bowl became close to empty, and alerted my nephews to feed the cat. Interesting to see tweeting from NodeJS, but very similar restrictions (frequency, message similarity etc)

    • @blasttrash
      @blasttrash 6 ปีที่แล้ว

      did you use arduino as a server? do you keep it running all day? If so, how do you handle the security, firewalls etc?

    • @guybegroovin2666
      @guybegroovin2666 5 ปีที่แล้ว

      @@blasttrash I would assume that the arduino is the hardware trigger that sends a message to the api to post a picture of the triggered snapshot made by the arduino

  • @Zxios
    @Zxios 7 ปีที่แล้ว +5

    Hey Dan, thanks for the videos. Just wondering if there is a way to make a bot DM someone when they follow an account?
    Thanks,
    Alexis

  • @HrishikeshKamath
    @HrishikeshKamath 7 ปีที่แล้ว

    Thank you so much for the video series!

  • @slymastera
    @slymastera 6 ปีที่แล้ว

    Thank you for this series.

  • @gafarraji
    @gafarraji 5 ปีที่แล้ว +5

    Hi, thank you for this great video. I have implemented the lesson in this video but every time I try running it, it returns error: Bad twitter streaming request: 404. Any Idea of what I'm doing wrong?

    • @RusticChaser
      @RusticChaser 5 ปีที่แล้ว

      Heres what I found on this, github.com/ttezel/twit/issues/500 but I don't know a work around for it yet.

  • @the_president
    @the_president 6 ปีที่แล้ว

    You are the best of the best
    Thank you very much for the help you have given me

  • @nonstopvinod
    @nonstopvinod 6 ปีที่แล้ว +4

    Great tutorial. Helped me a lot. :)
    Can we make the bot happen through Html? Say I have a text box and a button to post. If yes, can you make a demo and add it here via link. Thanks.

  • @XeeshanPlay
    @XeeshanPlay 3 ปีที่แล้ว

    This is real use of TH-cam

  • @kimrader111
    @kimrader111 3 ปีที่แล้ว

    Have you done any updates to this playlist to discuss the changes to Twitter since these videos were made? (things that have been deprecated etc.)

  • @MaxJacobson1
    @MaxJacobson1 5 ปีที่แล้ว

    I made a bot that enters contests for me 24/7. Still trying to get past some of the twitter limits, but it seems to be working well.

  • @philmageo
    @philmageo 7 ปีที่แล้ว

    thank you so much ! you are just perfect !

  • @NoiseisKing
    @NoiseisKing 7 ปีที่แล้ว

    Thanks! Implementing our bot :)

  • @nirvana7420
    @nirvana7420 4 ปีที่แล้ว

    I don't find the code in your GitHub. Did you update the repository? Can you please provide the correct link? Sorry I know it's old video but I think your video still worthwhile to watch and learn.

  • @nishkaarora6343
    @nishkaarora6343 8 ปีที่แล้ว +4

    Hey, how do I keep my twitter bot running forever, even when my terminal is closed. Thanks so much for all your help.

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว +8

      google "nohup". I cover this in a later video in the playlist I think?

    • @kokomaster3084
      @kokomaster3084 7 ปีที่แล้ว +6

      download pm2 module
      # npm install -g pm2
      # pm2 startup systemd
      # systemctl status pm2
      go to your app folder
      # pm2 start yourmainApp.js

    • @goodev
      @goodev 7 ปีที่แล้ว +1

      Great question Nishka! Thank you shiffman and Koko Master for sharing!

    • @Jpk45
      @Jpk45 4 ปีที่แล้ว

      Pm2

  • @chaosunstabledynamic
    @chaosunstabledynamic 7 ปีที่แล้ว

    This is extremely helpful, @The Coding Train. Thank you! Wondering how you are getting the green screen situation?

  • @bryantfeld4709
    @bryantfeld4709 7 ปีที่แล้ว

    great series!

  • @dsadad21
    @dsadad21 5 ปีที่แล้ว +1

    Holy shit watching this September 16 2019 and there are 0 dislikes on this vid. Legendary

    • @damiamquimtana573
      @damiamquimtana573 4 ปีที่แล้ว

      You had to say it didn't you?

    • @dsadad21
      @dsadad21 4 ปีที่แล้ว +1

      @@damiamquimtana573 I mentioned the date because I knew some dick head would dislike it eventually. Still, 4 years with no dislikes and 60K views is impressive

    • @damiamquimtana573
      @damiamquimtana573 4 ปีที่แล้ว

      @@dsadad21 I remember one video of kirby that endure like 5 years without a dislike

    • @dsadad21
      @dsadad21 4 ปีที่แล้ว

      @@damiamquimtana573 foreal, send me the link

    • @damiamquimtana573
      @damiamquimtana573 4 ปีที่แล้ว

      @@dsadad21 th-cam.com/video/RzM_-YTnQo0/w-d-xo.html
      apparently it was more than 5 years cuz it was from the 2009

  • @duckshesh9828
    @duckshesh9828 4 ปีที่แล้ว +1

    Hey Dan! Do you know any sort of way I can use the icanhazdadjoke.com api to create a random joke and post that as a tweet? If you do it would be really helpful and also by the way I'm the first student in my school to make a twitter bot in the 9th grade. All thanks to you !!!

  • @Bungle6620
    @Bungle6620 6 ปีที่แล้ว +2

    Looks like the API used via var stream = T.stream('user'); refers to a now deprecated user streams endpoint (removed 7 days after starting my bot build!) Any thoughts on a way round this?

    • @TheCodingTrain
      @TheCodingTrain  6 ปีที่แล้ว +6

      I need to look into this!

    • @jaswanth333
      @jaswanth333 5 ปีที่แล้ว

      its not working provide a solution bro

    • @benjamiam
      @benjamiam 5 ปีที่แล้ว

      I found this, but looking through the links provided it's a bit over my head. If anyone can help figuring it would be appreciated! stackoverflow.com/questions/51905999/node-js-twitter-bot-returning-error-bad-twitter-streaming-request-410/51931966

    • @camusfranco8822
      @camusfranco8822 4 ปีที่แล้ว

      @@TheCodingTrain This project is so cool!! Please help us if there is a there a work-around to this issue!

    • @Samuel-eg5wc
      @Samuel-eg5wc ปีที่แล้ว

      @@TheCodingTrain whats the solution!

  • @geoffwagner4935
    @geoffwagner4935 ปีที่แล้ว

    So my first take a youtube live chat event and repeats one of them to Elon's twitter. already hit my 50 tweet limit today again lol these npm's are a blast xD

  • @adrianaalvaradolopez6446
    @adrianaalvaradolopez6446 5 ปีที่แล้ว +1

    Hola, estoy siguiendo este tutorial, pero cuando lo ejecuto, veo este error y busqué soluciones, pero no puedo encontrarlo. Te agradecería si pudieras ayudarme. Muchas gracias por el excelente video.
    events.js:183
    lanzar er // Evento de 'error' no manejado
    ^
    Error: Solicitud incorrecta de transmisión de Twitter: 404

  • @jrdn129
    @jrdn129 7 ปีที่แล้ว +1

    just a simple question. i cant understand the purpose of the paramater 'eventMsg' where it coming from and its purpose

    • @wazaabazaa
      @wazaabazaa 7 ปีที่แล้ว

      eventMsg is JSON data that was pulled from the stream.on followed event. It can be named anything.
      Think of it similar to a click event (eventListeners) and you want to pull where the User clicked on... (ie. event.target)

  • @koutanakano1443
    @koutanakano1443 5 ปีที่แล้ว +1

    As of 2018, I get this error for the follow message stream function.
    hmmm...
    The follow bot is starting...
    events.js:183
    throw er; // Unhandled 'error' event
    ^
    Error: Bad Twitter streaming request: 410

    • @chanellesesh4977
      @chanellesesh4977 5 ปีที่แล้ว +1

      I'm also having the same problem, it's because twitter doesn't allow for the stream APIs anymore, you need to use account activity API which Twit package doesn't cover at the moment.

    • @koutanakano1443
      @koutanakano1443 5 ปีที่แล้ว +1

      @@chanellesesh4977 ohhh I see. thanks!

  • @saidakhmedagitaev
    @saidakhmedagitaev 7 ปีที่แล้ว

    thank you so much! you are awsm teacher! do you feel OK, if I take this as a sample and make my own TwitterAPI and upload it to github? thanks!

  • @felixolonde9108
    @felixolonde9108 7 ปีที่แล้ว

    Hi want to get the status(the message to tweet) from a textbox in an html file. How do i go about it.Kindly help

  • @kokomaster3084
    @kokomaster3084 7 ปีที่แล้ว

    thank you daniel for nice tutorial,
    how to replace math random with random hashtags readit from a file txt or json?

  • @cosmos3682
    @cosmos3682 4 ปีที่แล้ว

    Important: user endpoint is removed what to do now???

  • @rjsantos6675
    @rjsantos6675 7 ปีที่แล้ว

    If I create an animation that is based on if somebody twits, for example make a ball bounce everytime there is mention of the hashtag 'basketball', i should use stream(), correct? Thanks for these awesome lessons!

    • @simplex2168
      @simplex2168 6 ปีที่แล้ว

      Can you please sand me the code from this example? Would be very interesting to me.

  • @djliandjlian
    @djliandjlian 6 ปีที่แล้ว

    does the follow works only when someone follows me or it triggers the callback even if i follow someone else?

  • @zakialzubair2816
    @zakialzubair2816 ปีที่แล้ว

    Is there a similar one for whatsapp?!
    Thank you for the knowledge

  • @sangeethng5730
    @sangeethng5730 5 ปีที่แล้ว

    How to send message directly to the particular user

  • @samueldelucas4412
    @samueldelucas4412 5 ปีที่แล้ว

    Hi Daniel!! If i want to post every hour, i have to keep my computer turned on until i want the bot to stop? Is there a way to keep the bot alive without having to keep my computer on? Thanks!!

    • @TheCodingTrain
      @TheCodingTrain  5 ปีที่แล้ว

      I cover this in a later video. th-cam.com/video/26bajyD4fLg/w-d-xo.html You can also check out my video on web application deployment th-cam.com/video/Rz886HkV1j4/w-d-xo.html

  • @vineet5678
    @vineet5678 5 ปีที่แล้ว

    hi, @The Coding Train Notice - can we make a bot that will do video editing itself, like we give it parameters like videos and tell it to cut them and combine them and add filters and transition to it. We often do the same things while video editing and can we make a bot to do these same tasks again and again. Thanks

  • @steffeneers2607
    @steffeneers2607 8 ปีที่แล้ว

    Daniel, great videos for beginners!
    I hope you also can offer some help for further questions. I'm looking for the twitter command to identify, if my bot has already retweeted a specific tweet. In Twitter developers I have found current_user_retweet. But I have no idea how to use it. Do you?

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว

      I would keep track of a list of tweet IDs yourself and then compare from your code.

  • @615608ify
    @615608ify 7 ปีที่แล้ว

    ur awesome ....this is so cool

  • @digitalsphere33
    @digitalsphere33 6 ปีที่แล้ว

    Hi Daniel,
    I was hoping you could perhaps help me with setInterval and stream.on. would like to set an interval to connect to a stream, call a function and then quit the stream and repeat after given time specified.
    Is this possible, and what would the code look like for example?

  • @latostadorano
    @latostadorano 8 ปีที่แล้ว

    I tried to change the Follow example to an unfollow event by just changing 'follow' to 'unfollow' in the stream line and it didn´t worked. Can't figure why if it's on the Twit stream events documentation.

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว

      +latostadorano Strange, it should work I think too! I also see it in the twitter docs. dev.twitter.com/streaming/overview/messages-types I'll have to look into this at some point. Let me know if you discover anything.

  • @tiny-starship
    @tiny-starship 8 ปีที่แล้ว

    so I'm having a strange error setInterval while following this video. I'm trying to pass a parameter into the tweetIt function, which is contained within a setInterval and it keeps bombing out on the second interval. It took me awhile to narrow it down, but i have these two code samples:
    This works:
    setInterval(log,1000);
    function log() {
    console.log("log");
    }
    this does not:
    setInterval(log("test"),1000);
    function log(txt) {
    console.log(txt);
    }
    The big picture idea is to call a function like this:
    setInterval(tweetIt(generateTweet),5000);
    the generateTweet function generates a string based on the time of day, weather, whatever.
    tweetIt then tweets the string, but it only works once before bombing out with this error
    C:\Dropbox\webDev\www
    ode>node notworking
    test
    timers.js:275
    timer._repeat();
    ^
    TypeError: timer._repeat is not a function
    at wrapper [as _onTimeout] (timers.js:275:11)
    at Timer.listOnTimeout (timers.js:92:15)
    C:\Dropbox\webDev\www
    ode>

    • @tiny-starship
      @tiny-starship 8 ปีที่แล้ว

      +Tiny Starship as usual 1 minute after posting a cry for help I figure it out. I had to change it to an anonymous function and it started working!
      thanks for the whole series, watched everyone and it helped me create a fake news bot for a game I'm creating. Working on making it a little more interactive. You mentioned in video 6 or 7 about creating a video on deploying our scripts to a server. Right now I'm just running it off of my iMac at home, would love to see that video :)
      Now this works:
      setInterval(function(){log("test")},1000);
      function log(txt) {
      console.log(txt);
      }

  • @mohandark
    @mohandark 7 ปีที่แล้ว

    you are awesome !!

  • @geoffwagner4935
    @geoffwagner4935 ปีที่แล้ว

    it's also note worthy if you want to tweet Elon 50 times on more free access, remember you only get 50 tweets in 24hrs oops xD Lol it was for happy to use a "for loop",lol was less then a few second xD

  • @migueladan1245
    @migueladan1245 4 ปีที่แล้ว

    are you going to remake this video since the User stream was closed on twitter?

  • @geoffwagner4935
    @geoffwagner4935 ปีที่แล้ว

    Wow, TH-cam may be where the real fun is to be had now xD it's so happy to just cough up 100s of comments and everything else, it seams very verse in google letting you do anything so far you ever wanted from twitter like wordnik xD not complaining about twitter, 50tweets every 24 is still nice but i'd still like the search back like youtube has for anything and everything xD using "youtube-sdk" for node in npm

  • @dark-co6fv
    @dark-co6fv 6 ปีที่แล้ว

    1:32 2 space indentation vs 4 space indentation
    is that a thing?

  • @oliverkey9974
    @oliverkey9974 7 ปีที่แล้ว

    If you wanted the bot to retrieve information off of a separate URL, how would you go about doing that? Would you need to insert the URL where you're getting data from?

    • @DimGG
      @DimGG 7 ปีที่แล้ว

      Late response but uf someone else sees this, you need to use the npm package called "request" which can make requests to urls and get the response as a raw string.

    • @wazaabazaa
      @wazaabazaa 7 ปีที่แล้ว

      Look into the Fetch API supported by all the main browsers.

    • @DimGG
      @DimGG 7 ปีที่แล้ว

      But this is a tutorial using nodejs

  • @jaredmendoza1575
    @jaredmendoza1575 6 ปีที่แล้ว

    hey dan nice tuto ,im working with node.js , and i have a question, i work in goddady hosting how can i charge my app on a server , and how can i install the twit api there?

    • @TheCodingTrain
      @TheCodingTrain  6 ปีที่แล้ว +1

      I'm not sure if godaddy has servers that can run node but this is a requirements. I use Amazon ("AWS") and Digital Ocean to run my bots with node.js.

  • @charbelsarkis3567
    @charbelsarkis3567 7 ปีที่แล้ว

    how do i display them on a webpage in a twitter styled way

  • @AbhishekVermaWasHere
    @AbhishekVermaWasHere 8 ปีที่แล้ว

    Hi, I tried to listen for 'unfollow' event but my callback never got called. According to Twit API I dont have to anything extra. Any idea what could be the issue? Thanks

    • @AbhishekVermaWasHere
      @AbhishekVermaWasHere 8 ปีที่แล้ว +2

      Just found that unfollow this will only be sent when the authenticating user unfollows someone, not when someone unfollows the authenticating user.

  • @jonathan-._.-
    @jonathan-._.- 5 ปีที่แล้ว

    I wonder if those api secrets / keys are still active ?

  • @yasaamoin4882
    @yasaamoin4882 7 ปีที่แล้ว

    that was fun

  • @Exeraksel
    @Exeraksel 8 ปีที่แล้ว

    Sorry, I know I'm really late posting this, but after I add the "tweetIt ();" and the "function tweetIt() {" and try to run the bot, it says "SyntaxError: Unexpected token )"
    Could you help me? thanks.

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว

      Hard to debug here, maybe try posting on a forum (stack overflow?) and link from here.

  • @nunyabizness4720
    @nunyabizness4720 4 ปีที่แล้ว +1

    Im trying to get through this series but i have an overwhelming urge to take your lunch money.
    Can you just take it down a notch in the future? Ty

  • @omarzalama
    @omarzalama 7 ปีที่แล้ว

    How could I get this bot to work without having my laptop running? What is the technology required for it?

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +1

      keep watching!

    • @lumanwalters_
      @lumanwalters_ 6 ปีที่แล้ว

      you would have to host it somewhere like on heroku. i think he shows you how to do that later on.

  • @MaheshYadav-st4dz
    @MaheshYadav-st4dz 3 ปีที่แล้ว

    Can I get full code? Wanna test

  • @prvs8
    @prvs8 8 ปีที่แล้ว

    can you please tell, how to retweet or fav. users tweet when they tweet with some specific hashtag!

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว

      +Parvesh Narwal you'll have to poke around the twitter API. maybe I can add some examples. Favoriting, for example, is here:
      dev.twitter.com/rest/reference/post/favorites/create

    • @prvs8
      @prvs8 8 ปีที่แล้ว

      +Daniel Shiffman Thanks. This is helpful.

  • @jakema4o
    @jakema4o 3 ปีที่แล้ว

    I love you

  • @volbolt99
    @volbolt99 6 ปีที่แล้ว

    TypeError: Cannot read property 'source' of undefined.. someone please help

    • @dasten123
      @dasten123 6 ปีที่แล้ว

      you probably missed something from the renaming at 10:20

  • @CardsAndCoding
    @CardsAndCoding 8 ปีที่แล้ว

    Hi! :) Is it possible to make a bot who reply when someone follow and tweeting images with Processing? Thanks!

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว

      Yes indeed, the pieces of this are in my examples on github!

    • @CardsAndCoding
      @CardsAndCoding 8 ปีที่แล้ว

      +Daniel Shiffman I don't see it :( I see files to make that but separately, is there a file who combine both?

  • @dxtr2943
    @dxtr2943 5 ปีที่แล้ว

    Hey Shiffman, I'm running code for 'follow' event and my cmd prompting
    Events.js:183
    Throws er; // unhandled 'error' event
    Error: Bad Twitter streaming request: 410
    Please let me know how to fix this
    Thanks for your time

    • @TheCodingTrain
      @TheCodingTrain  5 ปีที่แล้ว +1

      Twitter deprecated the streaming API sadly. You can check out my new Mastodon bot tutorials if you like!

    • @rajatgoyal8162
      @rajatgoyal8162 4 ปีที่แล้ว

      Yes I was also pulling out my hair since an hour, why it is not working and then found that it is deprecated,huuuh It sucks man☹️

  • @user-lg6mz4rt5k
    @user-lg6mz4rt5k 5 ปีที่แล้ว

    T.stream('user') is possible to abolish these days.

    •  5 ปีที่แล้ว

      What should I try instead? I'm trying it but it seems no working

  • @MrBullet45100
    @MrBullet45100 6 ปีที่แล้ว

    Hey!! You're amazing but it doesn't work if a private twitter account follows me!

  • @VIKTOR69
    @VIKTOR69 6 ปีที่แล้ว

    how i run it code on windows? pls help

  • @SarvpriyArya
    @SarvpriyArya 6 ปีที่แล้ว

    please don't ever try to use it on facebook,
    i've used it but all went wrong
    your stories will be published but can't be seen by your followers

  • @thelostcreatives5060
    @thelostcreatives5060 7 ปีที่แล้ว

    how do I reply to a tweet?

  • @miguelyuum1996
    @miguelyuum1996 3 ปีที่แล้ว

    I fucking love you

  • @wahibakamoulcode
    @wahibakamoulcode 6 ปีที่แล้ว

    plz how to get a tweet by id and thanks :)

    • @nismo5807
      @nismo5807 6 ปีที่แล้ว

      If you goto the Twit package site you can see it ;)

  • @gregoryromero9709
    @gregoryromero9709 3 ปีที่แล้ว

    1:07 xDDD

  • @jv18creator
    @jv18creator 3 ปีที่แล้ว

    I am shocked
    1k likes n just 1 dislike 🎉🎉❤️

  • @ezequiasrocha3037
    @ezequiasrocha3037 7 ปีที่แล้ว

    could I track another account beyond mine?

  • @Magiccc
    @Magiccc ปีที่แล้ว

    Late to the party but why not. I have code that creates an array of possible tweets, "tweetArray" that randomly selects a tweet from said array each time the function to tweet is called
    var selectedTweet = tweetArray[Math.floor(Math.random()*(tweetArray.length)-1)];
    This claims to successfully tweet, but doesn't seem to actually post anything, and sometimes will throw the error "Missing required parameter: status."
    any advice?

  • @adrianoldchannel2494
    @adrianoldchannel2494 6 ปีที่แล้ว

    Wow

  • @rgb2647
    @rgb2647 ปีที่แล้ว

    yeah not working anymore

  • @abhir2085
    @abhir2085 6 ปีที่แล้ว

    can anyone share the code?

  • @ezequiasrocha3037
    @ezequiasrocha3037 7 ปีที่แล้ว

    Don't use sublime. To code use Brackets [code the web]

  • @nirvana7420
    @nirvana7420 4 ปีที่แล้ว

    I don't find the code in your GitHub. Did you update the repository? Can you please provide the correct link? Sorry I know it's old video but I think your video still worthwhile to watch and learn.