Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Post a tweet

Does anyone have a example of how to post a tweet? following twitter.js and twitter api but I cant follow it. thanks for any help

— asked April 3rd 2010 by scott castov
  • api
  • iphone
  • twitter
0 Comments

2 Answers

  • Accepted Answer

    For your convenience I posted her the code snippet by Kevin Whinnery from this post - http://support.appcelerator.net/discussions/support/1129-http-basic-authentication. Hope this helps…

    var url = "https://username:password@twitter.com/statuses/update.json";
    var xhr = Titanium.Network.createHTTPClient();
    xhr.onload = function() {
      // Handle response
    };
    xhr.open("POST",url);
    xhr.send({ status:'My awesome tweet!' });
    
    — answered April 5th 2010 by First Name Last Name
    permalink
    0 Comments
  • i tried this i thinks it's not working know

    — answered February 22nd 2012 by guellai farid
    permalink
    3 Comments
    • This was a long time ago and Twitter has since changed and enhanced it's authentication requirements. You could use a library such as Birdhouse or oAuthAdapter to do the authentication and post tweets, as well as other API calls.

      https://github.com/jpurcell/birdhouse

      https://github.com/stereoket/oauth-adapter

      — commented February 22nd 2012 by Brian Blankenship
    • But those exemple are for Twitter app authentification i need only user authentication and poste an url in there twitter .

      — commented February 22nd 2012 by guellai farid
    • That's what you need if you want your app to be able to post to their Twitter account.

      — commented February 22nd 2012 by Brian Blankenship
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.