Skip to content

Commit

Permalink
tweetstache.js: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Kridner committed Dec 19, 2012
1 parent b9e60f6 commit 910ca5f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tweetstache.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
var http = require('http');
var https = require('https');
var fs = require('fs');
var oauth = require('oauth');
var OAuth = require('oauth').OAuth;
var child_process = require('child_process');
var keys = require('./twitterkeys');

function sendTweet(tweet, photoName) {
var OAuth = oauth.OAuth;
var hostname = 'upload.twitter.com';
var path = '/1/statuses/update_with_media.json';
var port = 443;
Expand Down Expand Up @@ -37,7 +36,7 @@ function sendTweet(tweet, photoName) {
+ tweet + crlf
+ separator + crlf
+ fileHeader + crlf
+ 'Content-Type: image/png' + crlf
+ 'Content-Type: image/jpeg' + crlf
+ crlf);

var multipartBodyLength = contents.length + data.length + footer.length;
Expand Down Expand Up @@ -105,6 +104,6 @@ function sendTweet(tweet, photoName) {
request.end();
};

var photoName = 'beaglestache.png';
var photoName = 'captured000.jpg';
var tweet = 'Test tweet from tweetstache.js';
sendTweet(tweet, photoName);

0 comments on commit 910ca5f

Please sign in to comment.