Skip to content

Instantly share code, notes, and snippets.

@jmhdez
jmhdez / GetTweets.cs
Created June 13, 2012 19:09
Get twitter's home timeline
// Related code: https://gist.github.com/2905028
public IEnumerable<string> GetTimeline(int count)
{
// Application tokens
const string CONSUMER_KEY = "YOUR_CONSUMER_KEY";
const string CONSUMER_SECRET = "YOUR_CONSUMER_SECRET";
// Access tokens
const string ACCESS_TOKEN = "YOUR_ACCESS_TOKEN";
const string ACCESS_TOKEN_SECRET = "YOUR_ACCESS_TOKEN_SECRET";
@jmhdez
jmhdez / Post_tweet.cs
Created June 10, 2012 11:31
Post tweet
public void UpdateStatus(string message)
{
// Application tokens
const string CONSUMER_KEY = "YOUR_CONSUMER_KEY";
const string CONSUMER_SECRET = "YOUR_CONSUMER_SECRET";
// Access tokens
const string ACCESS_TOKEN = "YOUR_ACCESS_TOKEN";
const string ACCESS_TOKEN_SECRET = "YOUR_ACCESS_TOKEN_SECRET";
// Common parameters
@jmhdez
jmhdez / analytics.cs
Created March 19, 2012 09:38 — forked from gregoryyoung/analytics.cs
Usage Tracking with Google Analytics
public class TrackingService
{
// Sample usage:
// service.TrackEvent("customers/add");
// service.TrackEvent("order/discount-applied");
public void TrackEvent(string path)
{
ThreadPool.QueueUserWorkItem(x => TrackPageView("/events/" + path));
}