TwitterAliases.

TwitterSendTweet(ICakeContext, string, string, string, string, string) Method

Summary

Send a Tweet using the Twitter REST API.
Assembly
Cake.Twitter.dll
Namespace
Cake.Twitter
Containing Type
TwitterAliases

Syntax

public static void TwitterSendTweet(this ICakeContext context, string oAuthConsumerKey, string oAuthConsumerSecret, string accessToken, string accessTokenSecret, string message)

Examples

     var oAuthConsumerKey        = EnvironmentVariable("TWITTER_CONSUMER_KEY");
     var oAuthConsumerSecret = EnvironmentVariable("TWITTER_CONSUMER_SECRET");
     var accessToken = EnvironmentVariable("TWITTER_ACCESS_TOKEN");
     var accessTokenSecret = EnvironmentVariable("TWITTER_ACCESS_TOKEN_SECRET");

     TwitterSendTweet(oAuthConsumerKey, oAuthConsumerSecret, accessToken, accessTokenSecret, "Testing, 1, 2, 3");

Attributes

Type Description
CakeMethodAliasAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The Cake Context
oAuthConsumerKey string The Twitter Consumer Key
oAuthConsumerSecret string The Twitter Consumer Secret
accessToken string The Twitter Application Access Token
accessTokenSecret string The Twitter Application Token Secret
message string The message to tweet.

Return Value

Type Description
void