CALL: http://twitdoc.com/api/uploadAndTweet Expects multipart HTTP POST request. Fields as multipart/form-data per RFC1867: - username (required) - Twitter username - password (required) - Twitter password - message (optional) - (status, tweet) to post to twitter. - file_1 (required) - Binary document data Notes: Tweet posted to twitter will consist of the message field (if present) followed by the shortened URL of the document (space separated). If message is omitted the shortened URL will be the only content of the tweet. RESPONSES: <?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <status_id>1756057071</status_id> <user_id>michaelormsby</user_id> <doc> <doc_id>15193705</doc_id> <doc_key>key-4sg9a1d04rub469ocpg</doc_key> <repos>scribd</repos> <long_url>http://twitdoc.com/docview?doc=15193705&key=key-4sg9a1d04rub469ocpg&usr=michaelormsby</long_url> <short_url>http://twitdoc.com/c/58p6zg</short_url> <doc> </rsp> <?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <status_id>1756036398</status_id> <user_id>michaelormsby</user_id> <doc> <repos>twitdoc</repos> <long_url>http://twitdoc.com/picview?pic_nbr=28&filename=twitty.jpg&usr=michaelormsby</long_url> <short_url>http://twitdoc.com/c/ybs3kk</short_url> <doc> </rsp> <?xml version="1.0" encoding="UTF-8"?> <rsp stat="fail"> <err code="401" msg="Invalid twitter username or password" /> </rsp> <?xml version="1.0" encoding="UTF-8"?> <rsp status="fail"> <err code="415" msg="Scribd upload failed: 604 Initial file saving failed" /> </rsp>
CALL: http://twitdoc.com/api/upload Expects multipart HTTP POST request. Either password or authorization_key is required. Fields as multipart/form-data per RFC1867: - username (required) - Twitter username - password (required alternative 1) - Twitter password - authorization_key (required alternative 2) - Partner's authorization key - file_1 (required) - Binary document data RESPONSES: <?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <user_id>michaelormsby</user_id> <doc> <doc_id>15193705</doc_id> <doc_key>key-4sg9a1d04rub469ocpg</doc_key> <repos>scribd</repos> <long_url>http://twitdoc.com/docview?doc=15193705&key=key-4sg9a1d04rub469ocpg&usr=michaelormsby</long_url> <short_url>http://twitdoc.com/c/58p6zg</short_url> <doc> </rsp> <?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <user_id>michaelormsby</user_id> <doc> <repos>twitdoc</repos> <long_url>http://twitdoc.com/picview?pic_nbr=28&filename=twitty.jpg&usr=michaelormsby</long_url> <short_url>http://twitdoc.com/c/ybs3kk</short_url> <doc> </rsp> <?xml version="1.0" encoding="UTF-8"?> <rsp stat="fail"> <err code="401" msg="Invalid twitter username or password" /> </rsp>
Please note that there's a subtle difference between calling "uploadAndTweet" without a message and "upload". The former posts a URL-only tweet while the latter does not post a tweet.