Skip to content

Instantly share code, notes, and snippets.

@myleftboot
Created August 28, 2012 21:56
Show Gist options
  • Save myleftboot/3504693 to your computer and use it in GitHub Desktop.
Save myleftboot/3504693 to your computer and use it in GitHub Desktop.
sweeTweet exmaple tweet call
var test = require('tmm.tweet');
test.tweet({ message: label.value, /* the message to tweet */
account: defAcct, /* the Twitter account to send the tweet from, can be left blank */
urls: ['copeconsultancy.co.uk/apps'], /* a url to attach to the tweet, optonal */
image: piccy, /* a Ti.blob image to attach to the tweet, optional */
success: function(obj) { alert('Tweet successfully sent'); Ti.API.info('Status Code = '+obj.result); },
cancel: function(obj) { alert('User has cancelled tweet'); },
error: function(obj) { alert('Unable to send tweet'); Ti.API.info('Status Code = '+obj.result); },
noAccount: function(obj) { alert('User has no twitter accounts on the device'); },
vw: view /* the current view being shown. Used to show the twitter account selection dialog */
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment