Defines constants and helper methods that facilitate Twitter functionality
Inheritance
System.Object
Twitter
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: NFX.Web.dll
public class Twitter : SocialNetwork, IApplicationComponent, IDisposable, IService, ILocalizedTimeProvider, IWebClientCaller, ISocialNetworkImplementation, ISocialNetwork, INamed, IConfigurable, IInstrumentable, IExternallyParameterized
Fields
Declaration
public const string OAUTH_ACCESS_TOKEN_URL = "https://api.twitter.com/oauth/access_token"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string OAUTH_REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string TWITTER_LOGIN_URL_PATTERN = "https://api.twitter.com/oauth/authenticate?oauth_token={0}"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string TWITTER_PUB_SERVICE_URL = "https://api.twitter.com"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string UPDATE_STATUS_INFO_URL = "https://api.twitter.com/1.1/statuses/update.json"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string USER_SHOW_URL = "https://api.twitter.com/1.1/users/show.json"
Field Value
Type |
Description |
System.String |
|
Properties
Declaration
public override bool CanPost { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Declaration
[Config]
public string ClientCode { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
[Config]
public string ClientSecret { get; set; }
Property Value
Type |
Description |
System.String |
|
Specifies how service takes user credentials
Declaration
public override CredentialsEntryMethod CredentialsEntry { get; }
Property Value
Overrides
Returns service description
Declaration
public override string Description { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Globally uniquelly identifies social network architype
Declaration
public override sealed SocialNetID ID { get; }
Property Value
Overrides
Returns a singleton instance of the social network provider
Declaration
public static Twitter Instance { get; }
Property Value
Declaration
public override bool RequiresSpecifiedExternalLoginReference { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Returns the root public URL for the service
Declaration
public override string ServiceURL { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Methods
AddMethodAndBaseURL(String, HTTPRequestMethod, String)
Declaration
public static string AddMethodAndBaseURL(string headerStr, HTTPRequestMethod method, string baseURL)
Parameters
Type |
Name |
Description |
System.String |
headerStr |
|
HTTPRequestMethod |
method |
|
System.String |
baseURL |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string CalculateSignature(string src, string secretKey, string tokenSecret = null)
Parameters
Type |
Name |
Description |
System.String |
src |
|
System.String |
secretKey |
|
System.String |
tokenSecret |
|
Returns
Type |
Description |
System.String |
|
Declaration
public override SocialUserInfo CreateSocialUserInfo(SocialUserInfoToken? existingToken = default (SocialUserInfoToken? ))
Parameters
Returns
Overrides
Declaration
protected override void DoObtainTokens(SocialUserInfo userInfo, JSONDataMap request, string returnURL)
Parameters
Overrides
Declaration
protected override void DoPostMessage(string text, SocialUserInfo userInfo)
Parameters
Overrides
Declaration
protected override void DoRetrieveLongTermTokens(SocialUserInfo userInfo)
Parameters
Overrides
Declaration
protected override void DoRetrieveUserInfo(SocialUserInfo userInfo)
Parameters
Overrides
Declaration
public override string GetExternalLoginReference(string returnURL)
Parameters
Type |
Name |
Description |
System.String |
returnURL |
|
Returns
Type |
Description |
System.String |
|
Overrides
Declaration
public static string GetOAuthHeaderString(Dictionary<string, string> dictionary)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
dictionary |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string GetRawOAuthHeaderStr(Dictionary<string, string> dictionary)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
dictionary |
|
Returns
Type |
Description |
System.String |
|
Declaration
public override string GetSpecifiedExternalLoginReference(SocialUserInfo userInfo, string returnURL)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
Implements
System.IDisposable
Extension Methods