Twitter OAuth Library (For .Net 4.0 or 2.0)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
TOAuthLib.cs
readme.md

readme.md

TOAuth Library v1.3.0

  • Twitter OAuth Library
  • MIT License
  • Require .Net 4.0 or 2.0
  • use .NET 4.0, remove annotation of #define USENET40

Function

Parametors

  • Method

    • GET or POST
  • Uri

  • Data

    • String
    object data = "param1=value1&param2=value2"
    
    • Stream
    object data = System.IO.File.OpenRead(path)
    
    • IDictinoray<string, object>
    IDictionary<string, object> dic = new Dictionary<string, object>
    dic.Add("status", "test");
    object data = dic;
    
    • byte[]
    object data = System.IO.ReadAllBytes(path);
    
    • Properties
    object data = new { Key1 = "Value1", Key2 = 123 }
    
    • Class (Must contains properties)
    class Info
    {
        public string status { set; get; }
        public long in_reply_to_status_id { set; get; }
    }
    object data = new Info();
    

Constructor

  • TOAuth (AppToken, AppSecret)
  • TOAuth (AppToken, AppSecret, UserToken, UserSecret)

Common

  • WebRequest MakeRequest (Method, Uri, Data, OAuthCallback)

.NET 2.0

  • String Call (Method, Uri, Data, ContentType, OAuthCallback, CallbackFunction, State)
  • IAsyncResult BeginCall (Method, Uri, Data, ContentType, OAuthCallback, CallbackFunction, State)
  • String EndCall(IAsyncResult)

.Net 4.0

  • String Call (Method, Uri, Data, ContentType, OAuthCallback)
  • Task<string> BeginCall (Method, Uri, Data, ContentType, OAuthCallback)