Created
August 28, 2012 21:56
-
-
Save myleftboot/3504693 to your computer and use it in GitHub Desktop.
sweeTweet exmaple tweet call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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