Connect and Post with the Twitter API

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 61

  • @louisvoi2413
    @louisvoi2413 4 місяці тому +1

    Thanks Man. Those API Specs were designed to be confusing! Appreciate you!

    • @madtc74
      @madtc74  4 місяці тому +1

      glad it helped.

  • @VictorLeslie
    @VictorLeslie 3 місяці тому +1

    This was incredibly helpful even one year later. Works like a f*cking charm

    • @madtc74
      @madtc74  3 місяці тому

      glad it helps

  • @robinmalli34
    @robinmalli34 Рік тому +3

    after so many tutorials and headache the only tutorial that works, subscribed and liked could you please create another video on how to post an image using a script thanks

    • @madtc74
      @madtc74  Рік тому +1

      Sure I will write one up shortly for you. I probably won't get to it until this weekend.

    • @madtc74
      @madtc74  Рік тому

      check this video out to post images to twitter or X: ua-cam.com/video/DdPPSUUhkfk/v-deo.html

  • @techrob25
    @techrob25 10 місяців тому +1

    Thank you for making such a concise video on this. This helped tremendously.

    • @madtc74
      @madtc74  10 місяців тому

      no problem. I am glad it helped.

  • @sohamsinha3555
    @sohamsinha3555 Місяць тому +1

    Very helpful, Thank you !

    • @madtc74
      @madtc74  Місяць тому

      @@sohamsinha3555 glad it helped you out.

  • @jitvimol
    @jitvimol 6 місяців тому +1

    Work like a charm! Thank you.

    • @madtc74
      @madtc74  6 місяців тому

      No problem. I am glad it helped.

  • @rithikaa4705
    @rithikaa4705 2 місяці тому +1

    Sir, will we be able to upload images as an input here? if so what is the function name that we have to use?

    • @madtc74
      @madtc74  2 місяці тому

      I have a video on it already here: ua-cam.com/video/DdPPSUUhkfk/v-deo.html

  • @vybhavshetty9094
    @vybhavshetty9094 9 місяців тому +1

    Thank you. Other tutorials did not work for some reason.

    • @madtc74
      @madtc74  9 місяців тому

      Things change overtime, so you may have looked at an older video.

  • @MR_manti765
    @MR_manti765 8 місяців тому +2

    You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here

  • @billyhargrove2355
    @billyhargrove2355 8 місяців тому

    Wow, Finally a real working video!! Also Can we search certain tweets? In that free API? If possible please share or do a video :)

    • @madtc74
      @madtc74  8 місяців тому +1

      You can, but not in the free version. In the old days, it was free. Unfortunately, it is a pay service now. Check this out: developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api.

    • @billyhargrove2355
      @billyhargrove2355 8 місяців тому

      @@madtc74(bro is still alive in comment section) yea i read the doc already 😭, btw how can i reach you for my doubts thou , please i could use ur help for my project :(

    • @madtc74
      @madtc74  8 місяців тому +1

      @@billyhargrove2355 hit me up in PM on twitter or X.

    • @billyhargrove2355
      @billyhargrove2355 8 місяців тому +1

      @@madtc74 sure! Thanks:)

    • @madtc74
      @madtc74  2 місяці тому

      no problem

  • @cmonkey0650
    @cmonkey0650 Місяць тому

    They now require callback uri / redirect url in the user authentication settings. How do I set that up?

    • @madtc74
      @madtc74  Місяць тому

      did you try localhost?

  • @phillb4nkz
    @phillb4nkz 10 місяців тому +2

    wooooow! check!!! thanks!!! 🚀

    • @madtc74
      @madtc74  10 місяців тому +1

      no problem - glad you liked it.

  • @ennriqe
    @ennriqe 2 місяці тому +1

    Awesome! Thank you, very useful chatgpt failed to tell me to select public client.

    • @madtc74
      @madtc74  2 місяці тому

      @@ennriqe glad it worked out for you. ChatGpt not bad, but you usually have to tweak what they write to work for your use case.

  • @evolv_85
    @evolv_85 Рік тому +1

    Great stuff. Thank you,

    • @madtc74
      @madtc74  Рік тому +1

      Glad you enjoyed it!

  • @Anjanaranirani-dh3jp
    @Anjanaranirani-dh3jp 6 місяців тому +1

    Hi, i have recently created a developer account in twitter for my project and i am using the free version . My project is design and implement an API that facilitate the posting of AI-curated content on twitter. Additionally,devise methods for conducting post engagement analysis to measure the performance and impact of the content after it has been posted using the API.
    So is it possible with my free version and can you please upload a video based on above.

    • @madtc74
      @madtc74  6 місяців тому

      Check out this video on how to post images to twitter: . What AI are you wanting to use to post AI art? They should have documentation on it. Anyway, the attached video should be able to get you started on the twitter end.

    • @Anjanaranirani-dh3jp
      @Anjanaranirani-dh3jp 6 місяців тому

      @@madtc74 Thank you , great tutorial and the code for posting images and text is working for me. Can you suggest me how to getting the post engagement analysis (like,comments etc) data after posting and how to add AI generated images and text instead of manual way .

    • @madtc74
      @madtc74  6 місяців тому

      I have not looked into it. I would need to read the API. I will get back with you.

  • @avinashabhi3503
    @avinashabhi3503 Рік тому

    I tried tweet is not getting uploaded can you suggest me

    • @madtc74
      @madtc74  Рік тому

      I need more information on what you are doing and where your code is failing to assist.

  • @nemanjatrivic9505
    @nemanjatrivic9505 10 місяців тому

    Is there free plan currently? I only see 100$ and 5000$ plans.

    • @madtc74
      @madtc74  10 місяців тому

      scroll down on this link: developer.twitter.com/en/docs/twitter-api. You will see a free version.

  • @zairalaraib
    @zairalaraib 9 місяців тому

    why does it keep saying unauthorized 401

    • @madtc74
      @madtc74  8 місяців тому

      it is telling you that there is something wrong with your credentials.

    • @zairalaraib
      @zairalaraib 8 місяців тому

      @@madtc74 oh thx, ill have to regenerate keys ig

    • @zairalaraib
      @zairalaraib 8 місяців тому +4

      @@madtc74 i double checked, same issue! please make a video for 2024, i cant find it anywhere! it would be of great help MadTC.

    • @zairalaraib
      @zairalaraib 8 місяців тому +1

      NVM, TRIED IT AGAIN AND IT WORKED, SUPER HAPPY

    • @madtc74
      @madtc74  8 місяців тому

      @@zairalaraib glad it worked for you this time.

  • @Vixnuverse
    @Vixnuverse Рік тому

    Thank you sir finally a simple tutorial,
    could you help me too,
    1.How would i get the data of tweet by its id,
    2.i know i need paid version, but which version or access level.
    if you can guide me, will help me a lot
    Thank you

    • @madtc74
      @madtc74  Рік тому +1

      I will take a look at it this weekend and shoot a video for it.

    • @madtc74
      @madtc74  Рік тому

      Looks like we need the basic plan. I am not going to pay $100 month for it.
      hiding the password video at ua-cam.com/video/njMMhJz3X4g/v-deo.html
      using different connections is here ua-cam.com/video/DdPPSUUhkfk/v-deo.html
      To get you started and answer your question you can try the below code:
      def twitConnection_v1(creds):
      #Define Keys
      consumer_key = creds['twitter']['consumer_key']
      consumer_secret = creds['twitter']['consumer_secret']
      # Access:
      access_token = creds['twitter']['access_token']
      access_secret = creds['twitter']['access_secret']

      auth = tweepy.OAuth1UserHandler(consumer_key, consumer_secret)
      auth.set_access_token(access_token, access_secret)

      return tweepy.API(auth)
      creds = yaml.load(open('social_credentials.yml'), Loader=yaml.FullLoader)
      client_v1 = twitConnection_v1(creds)
      then in your IDE you can type "client_v1." After the "." you can wait, and you will see a list of commands that you can use with client_v1.
      for example, this works for ID:
      id = "number_here"
      user = client_v1.get_user(id=id)
      print(f"user id {id} is {user.name}.")
      I tried to run a few commands, but I only have the free version.
      453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: developer.twitter.com/en/portal/product

  • @sylvainberliat
    @sylvainberliat Рік тому

    thanks for the video, "i got an error. 401 unauthorised"

    • @madtc74
      @madtc74  Рік тому +1

      Check your API keys. You could have mistyped them.