Post Images to Twitter / X Using Python!

Sdílet
Vložit
  • čas přidán 22. 07. 2024
  • In this video, I am going to show you how to post images to Twitter or X using Python. In this example, we are going to use the Tweepy API using Twitter (X) version one and version two API.
    gitlab: gitlab.com/MadTcTutorials/pyt...
    previous videos in series:
    • Connect and Post with ... -- how to post msg to Twitter/X
    • Hide Your Password in ... -- how to hide your passwords in Jupyter
    Affiliates:
    R730: amzn.to/3QWm6mx
    CHAPTERS
    ---------------------------------------------------
    00:00 Intro
    00:18 Overview of Old Project
    01:29 Build Connection Function for API Version One
    04:55 Establish Connection
    05:55 Updating Old Message
    06:07 Identifying File to Post
    07:25 Prepare Media File
    07:56 Run Some Cells
    08:44 Obtain Media ID
    09:35 Post Image to (X) Twitter
    11:25 Like and Subscribe
  • Věda a technologie

Komentáře • 26

  • @rayoh2011
    @rayoh2011 Před 2 měsíci +1

    Hello MadTc Tech, appreciate your excellent tutorial! I enjoy your narrative style: direct to the point, no wasting viewers' time with intros and outros, background music, asking people to like and sub, etc... So, thank you, and liked and sub'd!

    • @madtc74
      @madtc74  Před 2 měsíci

      I do the "like and subscribe" at the end of videos :)

  • @dorkfactory
    @dorkfactory Před 12 dny +1

    thanks a ton! works like a charm

    • @madtc74
      @madtc74  Před 12 dny

      @@dorkfactory glad it works for you

  • @alizimv6946
    @alizimv6946 Před 6 měsíci +2

    Short and to the point, thanks for the amazing tutorial :)

    • @madtc74
      @madtc74  Před 6 měsíci +1

      I like to keep these as short as possible.

  • @TangoMike72
    @TangoMike72 Před 7 měsíci +1

    I've been amature coding for a couple years and never had the code work straight away 😂plus even though I didn't use the key hider I still understood enought from the video to code it out 😮 AMAZING video ! Thanks

    • @madtc74
      @madtc74  Před 7 měsíci +1

      thanks. I appreciate that.

  • @K8LOYT
    @K8LOYT Před 5 měsíci +1

    when u see non-GenZ, u will surely get what title and thumbnail say :), tysm I wish YT is as sane as it was 5-10 years back, GenZ have ruined social media apps for people who are looking for solutions like these.

    • @madtc74
      @madtc74  Před 5 měsíci +1

      glad this helped you out.

  • @robinmalli34
    @robinmalli34 Před 9 měsíci +2

    great tutorial

  • @user-zf4dw2uv8x
    @user-zf4dw2uv8x Před 5 měsíci +1

    thanks for the video it is great. could you make one on how to post videos? i seem to be running into some sort of 5 mb ceiling that i can't get around.

    • @madtc74
      @madtc74  Před 5 měsíci

      It's a data limit. Please see: developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/overview. This will show you the data limits. Also, are you looking at posting a link to embed the video or actually talking about uploading a video file?

    • @user-zf4dw2uv8x
      @user-zf4dw2uv8x Před 5 měsíci

      I did find that twitter dev doc, but i didn't know how to use the amplify. I was thinking to upload the video file myself, but I hadn't considered embedding because I don't know how to do it, but maybe it works a lot better? @@madtc74

    • @user-zf4dw2uv8x
      @user-zf4dw2uv8x Před 5 měsíci

      thanks, i actually found that page as well but didn't know how to use the amplify. I was thinking to just upload video files, but i hadn't considered using links, i don't want the post to appear as a quote though. What would you do?@@madtc74

    • @user-zf4dw2uv8x
      @user-zf4dw2uv8x Před 5 měsíci

      thanks, i actually found that page as well but didn't know how to use the amplify. I was thinking to just upload video files, but i hadn't considered using links, i don't want the post to appear as a quote though. What would you do?

    • @user-zf4dw2uv8x
      @user-zf4dw2uv8x Před 5 měsíci +1

      nevermind, figured out how to embed

  • @Anjanaranirani-dh3jp
    @Anjanaranirani-dh3jp Před 2 měsíci

    Can you suggest me how to getting the post engagement analysis (like,comments etc) data after posting and how to add OpenAI generated images and text instead of manual way .

    • @madtc74
      @madtc74  Před 2 měsíci

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

    • @Anjanaranirani-dh3jp
      @Anjanaranirani-dh3jp Před 2 měsíci

      Ok

    • @madtc74
      @madtc74  Před měsícem

      I have not forgot about you. Look at this link for twitter: github.com/xdevplatform/Twitter-API-v2-sample-code

    • @madtc74
      @madtc74  Před měsícem

      Check this out: czcams.com/video/eVJ8I6FeSN4/video.html

    • @Anjanaranirani-dh3jp
      @Anjanaranirani-dh3jp Před měsícem +1

      @@madtc74 Thank you