Twitting using Yedda Twitter .Net/C# API

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using Yedda;

using System.Xml;

namespace TwitterTest

{

class Program

{

static void Main(string[] args)

{

Twitter twit = new Twitter();

String str = twit.Update("yourUserName", "YourPassword", "A twit from my Yedda Twitter API", Twitter.OutputFormatType.XML);

Console.Read();

}

}

}

Yedda Twitter C# API Update method:

I was getting the following error message while twitting using the Yedda Twitter API: The remote server returned an error: (417) Expectation Failed. (ASP.NET 2.0 / C#)

The highlighted line shown in the code snippet below solved the problem.

protected string ExecutePostCommand(string url, string userName, string password, string data) {

try

{

WebRequest request = WebRequest.Create(url);

System.Net.ServicePointManager.Expect100Continue = false;

……

……

Reference:

Yedda Twitter C# Library (or more of an API wrapper) v0.1

// Written by Eran Sandler (eran AT yedda.com)

http://devblog.yedda.com/index.php/twitter-c-library/

Comments

  1. thanks shrinand!
    how did you come up with this solution?

    ReplyDelete
  2. any sample for encrypt twitter password in console application ? thx

    ReplyDelete

Post a Comment

Popular posts from this blog

WPF How to Dispose ViewModel when the associated UserControl (Not Window) closes?

C# How to unit test Dispatcher

WPF: VisualTreeHelper Find Parent of Specific Type