Twitter API Tutorial: How to Create and Get Tweets Using PHP and the Twitter API

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • In this Twitter API tutorial, you'll learn how to create a Twitter App, connect to the API, send a tweet and get your tweets... all through the Twitter API and PHP.
    You can learn more about Rob's Developer course here:
    www.johnmorrisonline.com/cwdc
    You can get the source code for this video on Patreon here:
    www.johnmorrisonline.com/patreon
    ~-~~-~~~-~~-~
    Please watch: "Ryan Carson: How to Get an IT Job WITHOUT a College Degree"
    • Ryan Carson: How to Ge...
    ~-~~-~~~-~~-~
    #php #webdev
  • Jak na to + styl

Komentáře • 48

  • @shhoppe
    @shhoppe Před 7 lety

    An excellent and easy-to-follow tutorial. Thanks!

  • @sankalpsuniil3033
    @sankalpsuniil3033 Před 4 lety

    Thanks a ton, friend! This was exactly what I was looking for, and it works perfectly for the site I'm creating. Cheers!

  • @kairoswave
    @kairoswave Před 7 lety

    Thanks john morris! great stuff, I started learning about API'S this week, this is awesome.
    Im A Web developer interning at a company so this will help alot!

    • @john.morris
      @john.morris  Před 7 lety

      +Juan Jimenez perfect timing!

    • @vincemat2735
      @vincemat2735 Před 7 lety

      Juan Jimenez let's link Bro.. vincemat01@gmail.com

  • @robertzebrowski5429
    @robertzebrowski5429 Před 7 lety +1

    Cloud 9 is similar to something like Sublime Text? Is there a great benefit to using the cloud for this versus just having it on one's local machine?

  • @bollywoodweddingdance850

    I usually dont comment , but this video was so simple and so easy that i made me say "thanks for the efforts man "

  • @alktab8993
    @alktab8993 Před 6 lety

    Hi john thank you for the learn

  • @SahilCrunch
    @SahilCrunch Před 7 lety

    How to use curl to get a specific data? like getting title of a file from any website ...

  • @Orgelmusik
    @Orgelmusik Před 6 lety

    Works fine! Thank you

  • @sergenietos
    @sergenietos Před 6 lety

    Are there any new restrictions accessing data after the Facebook 2018 case?

  • @Devahmad
    @Devahmad Před 7 lety

    i just want when i submit a form from my website .. the content appear on my page on tweeter

  • @hasib1767
    @hasib1767 Před 6 lety

    What is the code for "First tweet then get access to my website"? That is give access/reward when I hear a tweet from a user!

  • @anianii
    @anianii Před 5 lety

    It’s giving me a fatal error in twitterouath/src/TwitterOAuth.php on line 545

  • @AltenirGama
    @AltenirGama Před 5 lety

    how to search only posts with given hashtag?

  • @MrMaksim2099
    @MrMaksim2099 Před 7 lety

    Hi John, what's going on? Why you don't produce CZcams videos. I miss you !)

  • @FranckTheMiner
    @FranckTheMiner Před 7 lety

    what if I wanted a user to write their tweet without changing the source code?

  • @SithembisoMkhize
    @SithembisoMkhize Před 6 lety +2

    Nice, Im interested in a follow-up app tutorial which gets the most interacted with or faved or retweeted tweets from your followers/ppl ur following.....is this feasible?.. sort of like what favstar.fm does

  • @lukegrice2548
    @lukegrice2548 Před 6 lety +1

    This doesnt seem to work for me.. blank 500 error page

  • @raedinurdiansyah5114
    @raedinurdiansyah5114 Před 5 lety

    Hi! great tutorial. It works for me. I've been using this tutorials and reading the docs but I just want to know do we can get tweets from several users?? I mean like 7 companies feeds??

  • @FordExplorer-rm6ew
    @FordExplorer-rm6ew Před 4 lety

    So we need to specify a domain name.
    Does this mean it hooks to our domain name?
    Could I use firebase for such a thing? Moreover is it effective?
    How to do this for just a client side project?

  • @testraindrops5490
    @testraindrops5490 Před 6 lety

    nice work

  • @MossiLP
    @MossiLP Před 7 lety

    I want to dive into Growth Hacking a little bit and want to scrape a users followers with this. But I have a question and maybe one of you guys had experienced this scenario. I am limited by the APIs calls per 15mins. But no problem so far, because I can set a key and continue scraping later. But what if I am scraping a "big player" that gets new followers while I am scraping and waiting and scraping and so on? Will this mess my Schedule up? Is there a smart way to scrape users followers, even when they have hundreds of thousands of followers?
    Thank you for the help, your video helped me a lot when I started with Twitter API. Great work!

  • @MR1CR3ZY
    @MR1CR3ZY Před 5 lety

    i need help in creating twitter developer account

  • @john.morris
    @john.morris  Před 7 lety +5

    How do you plan to use this?

    • @qasimthedream5243
      @qasimthedream5243 Před 6 lety

      Denzell Loria have you done it yet? Would love to hear how it went

    • @jameschin6
      @jameschin6 Před 5 lety

      @@randomgaingvidsduringlockdown I would like to know more. Kindly reply

    • @itscorvid358
      @itscorvid358 Před 5 lety +1

      to send tweets via elmer's smart glue

  • @mohitkumar559
    @mohitkumar559 Před 4 lety

    Hi, so do we require any online website or we can do from our local server

  • @kekaduval4924
    @kekaduval4924 Před 4 lety

    how can we beautify the result?

  • @realmadridfantasy9409
    @realmadridfantasy9409 Před 7 lety

    Great effort!! Js a beginner here

  • @heriblandt
    @heriblandt Před 7 lety +1

    How can I make this only show my tweets?

    • @manualvarado2212
      @manualvarado2212 Před 7 lety

      Hello! Hope you had figured it out already, but anyways, i think you can use something like this:
      foreach($statuses as $key=>$tweet){
      if($statuses[$key]->user->screen_name != "yourName"){
      echo $statuses[$key]->text."";
      }
      }
      The name don't need the "@" at the beginning.

  • @raghavkabra9853
    @raghavkabra9853 Před 5 lety

    stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => Sorry, that page does not exist [code] => 34 ) ) )
    this error is coming after removing spaces everything

  • @EmmanuelFletcher21
    @EmmanuelFletcher21 Před 7 lety +1

    It doesn't show anything and doesn't work

  • @orviv7880
    @orviv7880 Před 7 lety

    For example
    I want to tweet and only my freinds can see it for parents it will be invisible

    • @orviv7880
      @orviv7880 Před 7 lety

      Do you understood what IAM trying to say?

  • @carlitosuk5
    @carlitosuk5 Před 6 lety

    Hi won't able to find you online jhonmorseonline.co/Paterson I need the HTML link please

  • @KimYoungUn69
    @KimYoungUn69 Před 7 lety +4

    wtf that setuppp

    • @hyiping5926
      @hyiping5926 Před 5 lety

      what setup ? i dont see anything unusual

  • @rezavelayani8223
    @rezavelayani8223 Před 6 lety

    Fatal error: Uncaught exception 'Abraham\TwitterOAuth\TwitterOAuthException' with message 'Operation timed out after 5000 milliseconds with 0 bytes received' in C:\xampp\htdocs\crawling\twitteroauth\src\TwitterOAuth.php:505 Stack trace: #0 C:\xampp\htdocs\crawling\twitteroauth\src\TwitterOAuth.php(422): Abraham\TwitterOAuth\TwitterOAuth->request('api.twi...', 'GET', 'Authorization: ...', Array) #1 C:\xampp\htdocs\crawling\twitteroauth\src\TwitterOAuth.php(374): Abraham\TwitterOAuth\TwitterOAuth->oAuthRequest('api.twi...', 'GET', Array) #2 C:\xampp\htdocs\crawling\twitteroauth\src\TwitterOAuth.php(356): Abraham\TwitterOAuth\TwitterOAuth->makeRequests('api.twi...', 'GET', Array) #3 C:\xampp\htdocs\crawling\twitteroauth\src\TwitterOAuth.php(209): Abraham\TwitterOAuth\TwitterOAuth->http('GET', 'api.twi...', 'account/verify_...', Array) #4 C:\xampp\htdocs\crawling\index.php(15): Abraham\TwitterOAuth\TwitterOAuth->get('account/verify_...') #5 {main} thrown in C:\xampp\htdocs\crawling\twitteroauth\src\TwitterOAuth.php on line 505
    how to solve this problem?

  • @weather4africa340
    @weather4africa340 Před 5 lety +1

    This process is no longer valid unfortunately. Now one has to apply for a developer account just to access your own Twitter accounts tokens, which is fine to an extent to prevent malicious bots. The first response came 3 weeks after the initial application. Why can't it just be as simple as a few "captchas" or the like.
    We have provided our "use case" several times and the response continues to be - "not enough information". All we want to do is automatically tweet images generated via scripts (twice a day) and somehow that is not enough info to get access to one's own Twitter tokens. And apps.twitter.com will "soon" be "retired" - good luck to those already using it. They want ridiculously in-depth details on everything, including stuff that we do not plan to do initially but might want to do in the future - how in the world do you give detail on that. Process is now ridiculous in my opinion.
    Maybe you can create a new Twitter account and test the developer application process because we are not winning and cannot figure out what more they want.

    • @lilinpeng9970
      @lilinpeng9970 Před 5 lety

      I'm struggling with the same problem. :( Did you get access to those data on twitter successfully?

  • @MModsGTAV
    @MModsGTAV Před 5 lety

    wtf you could just put the code

  • @tommybush1302
    @tommybush1302 Před 7 lety

    Try best twitter tool tweetattackspro whitehatbox.com/BBS/index?auid=16881