Twitter API trick: use standard update method for direct messages
December 23, 2008
/ Filed under: Twitter, API, Tips, Development
If you utilize the Twitter API, it may be refreshing to know that you can save some development time when working with direct messages. The Twitter API provides various direct message methods, including one called "new", which sends a user a new direct message. The URL for the
This contrasts the standard "update" method URL, which looks like this:
Rather than building your application around those two separate, distinct URL's, you can choose to use only the "update" method, even for sending direct messages. Just prepend the "update" method call's text with This is a smart feature of the API, because they made it work just like the standard web interface works. It's funny, though - I can't find any mention of this capability in the API documentation. Nothing should be assumed, especially something that saves developers time.
Comments/Mentions
|
Editor Picks
Email NewsletterSubscribe to the digest newsletter to receive posts by email: Recent Comments
Advertisements
|