HOW TO SEARCH ANYONE ON TWITTER USING TWITTER SEARCH ENGINE ON C# CONSOLE APPLICATION

HOW TO SEARCH ANYONE ON TWITTER USING TWITTER SEARCH ENGINE ON C# CONSOLE APPLICATION

NOTE:
  • YOU NEED TO HAVE MICROSOFT VISUAL STUDIO (2010 OR NEWER VERSION) OR YOU CAN HAVE ANY PLATFORM WHICH SUPPORTS C# CONSOLE APPLICATION.

  • AFTER CREATING THE PROJECT, FIRST ADD THE LIBRARIES:
  1. using System.Net;
  2. using System.IO;
  3. using System.Diagnostics;
  4. using System.Threading;

NOW,

Write or paste the following code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;
using System.IO;
using System.Net;
namespace twittersearchengine
{
    class Program
    {
        static void Main(string[] args)
        {
            string search_name;
            Console.WriteLine("Enter the name to search about him/her:\n");
            search_name = Console.ReadLine();
            searchtwitter(search_name);
            Console.Read();
        }
        static void searchtwitter(string name)
        {
            Process.Start("https://twitter.com/search?q="+ name);
        }
    }
}

IT'LL PRODUCE THE FOLLOWING OUTPUT:


Comments

Contact Form

Name

Email *

Message *