Hi
How to Post video on twitter/linked In account using c#
Thanks
Hi
How to Post video on twitter/linked In account using c#
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Eliana BlakeRank #1,595 · 993 reputationPosted Apr 27, 2025, 12:59 AM EDT
Hello! It seems like you are interested in learning how to post a video on Twitter/LinkedIn using C#. Posting videos programmatically can be quite beneficial for automating content sharing. Unfortunately, both Twitter and LinkedIn APIs do not natively support video upload functionalities using C#. However, there are workarounds that you can explore to achieve this.
One common approach is to use third-party libraries like Tweetinvi for Twitter or LinkedIn API Libraries for LinkedIn. These libraries provide functionalities to interact with the respective APIs and can be integrated into your C# application to handle video uploads.
Here is a basic example using Tweetinvi for posting a video on Twitter in C#:
// Install the Tweetinvi package from NuGet // Instantiate Twitter credentials var userCredentials = new TwitterCredentials("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"); // Upload video to Twitter var media = Upload.UploadVideo("path_to_video.mp4"); if (media != null) { // Post tweet with video var tweet = Tweetinvi.Tweet.PublishTweet("Check out this video!", new PublishTweetOptionalParameters { Medias = { media } }); }Remember to replace the placeholders like CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, and ACCESS_TOKEN_SECRET with your actual Twitter API credentials.
For LinkedIn, you can explore the LinkedIn API documentation for ways to achieve video posting programmatically in a similar manner.
Do let me know if you need further assistance or more detailed examples!