Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Beginner - Help

$
0
0
Hey there,

I just started working on my first API project in Uni, and decided to use Tweetinvi for it.

However, for some reason, I am not being able to either post or get anything from Twitter. All the credentials have been added, but nothing happens. Can you tell me what is wrong with my code?

Thanks.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Tweetinvi;


namespace TSA
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            TwitterCredentials.SetCredentials("xxxxx", "xxxxx", "xxxxx", "xxxxx");

            TwitterCredentials.ApplicationCredentials = TwitterCredentials.CreateCredentials("xxxxx", "xxxxx", "xxxxx", "xxxxx");
        }

        private void button1_Click(object sender, EventArgs e)
        {

           

            var tweet = Tweetinvi.Tweet.PublishTweet("C# API Test");
            var tweets = Search.SearchTweets("tweetinvi");
            Console.WriteLine(tweets);


        }
    }
}

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>