How to Post a Tweet Using a .NET 8 Web API 🐦

Sdílet
Vložit
  • čas přidán 8. 07. 2024
  • 🚀 Get the .NET 8 Web Dev Jump-Start Course for FREE: dotnet8.patrickgod.com
    💖 Support me on Patreon for exclusive source code access: / _patrickgod
    🐦 Let's get social on Twitter/X: x.com/_PatrickGod
    Table of Contents:
    00:00 How to Post a Tweet Using a .NET 8 Web API 🐦
    00:47 Get Twitter API Keys
    05:21 How I Got to the Solution
    06:37 The .NET 8 Web API Project
    06:58 Install Tweetinvi
    07:39 Add a new Model
    08:49 Add a Controller
    10:14 How OAuth 1.0a works with the Twitter API
    12:24 Implement the PostTweet Method
    19:11 Run the App
    #DotNet #Twitter #DotNet8

Komentáře • 14

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

    Just dropping this here in case someone is as lost as I was: To use the v2 tweets endpoint to post tweets you need an Access token and secret with Read, Write permission. If you created one without setting up User authentication first, it will only create it with the Read permission, so first you need to set up User authentication and then re generate the Access token and secret for it to have write permission and be able to create tweets with the api v2 endpoint.

  • @ExpensivePizza
    @ExpensivePizza Před 10 měsíci +1

    This is great. Something I've been meaning to look into for a while now. Thanks!

    • @PatrickGod
      @PatrickGod  Před 10 měsíci

      Awesome! Glad I could help! 😊

    • @10Totti
      @10Totti Před 10 měsíci

      Github code please :(

  • @user-vh7qg1ws9n
    @user-vh7qg1ws9n Před 6 měsíci +1

    Great video, any idea on how to tweet an image? I tried it many times but no luck.

  • @harvey_04
    @harvey_04 Před 9 měsíci +1

    Thanks for the video bro

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

    Failed to fetch.
    Possible Reasons:
    CORS
    Network Failure
    URL scheme must be "http" or "https" for CORS request. how can i fix this?

  • @huuse2760
    @huuse2760 Před 7 měsíci

    this is great. btw how about get tweets?

  • @1stkings
    @1stkings Před 9 měsíci

    Hello Patrick God, Thank you for this video but i couldnt find my twitter (X) API Keys .please how do i do that

    • @PatrickGod
      @PatrickGod  Před 9 měsíci

      You have to register in the Twitter Developer Portal. It's totally free. 😊

    • @1stkings
      @1stkings Před 9 měsíci

      @@PatrickGod please Good 😊 morning from this side is there any link to register

    • @1stkings
      @1stkings Před 9 měsíci

      thank you i have been able too sign up
      @@PatrickGod