func NewTwitterClient(ctx context.Context) *oauth.Consumer { httpClient := urlfetch.Client(ctx) c := oauth.NewCustomHttpClientConsumer( TwitterConsumerKey, TwitterConsumerSecret, oauth.ServiceProvider{ RequestTokenUrl: "https://api.twitter.com/oauth/request_token", AuthorizeTokenUrl: "https://api.twitter.com/oauth/authorize", AccessTokenUrl: "https://api.twitter.com/oauth/access_token", }, httpClient) return c }
func newConsumer(credentials *Credentials, client *http.Client) *oauth.Consumer { return oauth.NewCustomHttpClientConsumer( credentials.ConsumerKey, credentials.ConsumerSecret, oauth.ServiceProvider{ RequestTokenUrl: requestUrl, AuthorizeTokenUrl: authUrl, AccessTokenUrl: tokenUrl, }, client, ) }