Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8907301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:52:52+00:00 2026-06-15T02:52:52+00:00

A month ago a build a twitter tool in c# Windows Form Application. I

  • 0

A month ago a build a twitter tool in c# Windows Form Application. I can send tweets and view the hometimeline,friendtimeline and the mentiontimeline. I used the twitterizer dll with the OAuthTokens method, but there is a refresh limit and it is very slow.

Now i want to start a streaming twitter application but i cant find a proper example or documentation for this. I started but i didn’t find the function who can start the stream and but it in a string or textbox. My question is how to get the stream from the hometimeline.

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 Twitterizer;
using Twitterizer.Streaming;

namespace Twww
{
    public partial class Form1 : Form
    {
        public OAuthTokens tokens = new OAuthTokens();
        private string userAgent = null;

        public Form1()
        {
            InitializeComponent();
            /* input tokens removed in example code */

            tokens.AccessToken = accessToken;

            tokens.AccessTokenSecret = accesssecret;

            tokens.ConsumerKey = consumerKey;

            tokens.ConsumerSecret = consumerSecret;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Twitterizer.Streaming.UserStreamOptions options = new UserStreamOptions();
            OAuthTokens token = new Twitterizer.OAuthTokens ();
            TwitterStream stream = new TwitterStream(token, userAgent, options);
        }
    }
}

I tried to make it work for a user stream, but i get 401 or 403 errors, who says i have no rights

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Twitterizer;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            OAuthTokens tokens = new OAuthTokens();
            string consumerKey = "XX";
            string consumerSecret = "XX";
            string accessToken = "XX";
            string accesssecret = "XX";

            tokens.AccessToken = accessToken;
            tokens.AccessTokenSecret = accesssecret;
            tokens.ConsumerKey = consumerKey;
            tokens.ConsumerSecret = consumerSecret;

            string url = "https://userstream.twitter.com/1.1/user.json?with=followings&replies=all";
            WebClient wc = new WebClient();
            wc.Credentials = new NetworkCredential("XX", "XX");
            StreamReader reader = new StreamReader(wc.OpenRead(url));

            string line;
            while ((line = reader.ReadLine()) != null)
            {
                dynamic json = JsonConvert.DeserializeObject(line);
                if (json.text != null)
                {
                    Console.WriteLine(json.text);
                }
            }
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:52:53+00:00Added an answer on June 15, 2026 at 2:52 am

    Check this, you have a very well designed guide of TwitterStream in twitterizer:

    http://thewayofcode.wordpress.com/tag/json/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We've built up an application infrastructure based on ActiveMQ. We can send and receive
A few months ago I build a quiz -application for one of my customers.
Two month ago I asked, how to realize the routing with language parameter in
About a month ago I saw a portfolio website in Flash that featured a
Since a month ago i am studying restful web services really hard. Now that
I started programming just few month ago so I am a pure beginner but
This is an interview question asked a month ago.... Do session use cookies? If
I start using matplotlib a month ago, so I'm still learning. I'm trying to
I decided to learn how to use github about a month ago, and I
I don't know why, but this code worked for me a month ago... maybe

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.