My favorites | Sign in
Project Logo
                
Search
for
Updated Nov 05, 2009 by lyolik1977
YFROGuploadAndPost  

METHOD: uploadAndPost

http://yfrog.com/api/uploadAndPost

Use this method to upload a photo or video to yfrog and to send it as a status update to Twitter.

Request fields

(post data should be formatted as multipart/form-data)

  • media - Binary image or video data; either media or url parameter is required
  • url - URL of image or video; either media or url parameter is required
  • username (required) - Twitter username
  • password (required) - Twitter password
  • message (optional) - Message to post to twitter. The URL of the image is automatically added.
  • tags (optional) - comma-separated list of tags. (tags can also include geo tags)
  • public (optional) - Public/private marker of your video/picture. yes means public (default), no means private
  • source (optional) - Twitter source parameter to display tweets as 'posted from SOURCE'. If not specified, yfrog is used.
  • key - DeveloperKey.

Sample response:

<?xml version="1.0" encoding="UTF-8"?>
<rsp status="ok">
 <statusid>1111</statusid>
 <userid>11111</userid>
 <mediaid>abc123</mediaid>
 <mediaurl>http://yfrog.com/abc123</mediaurl>
</rsp>

Sample error response:

<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="fail">
    <err code="1001" msg="Invalid twitter username or password" />
</rsp>

Error codes and their descriptions:

1001 - Invalid twitter username or password

1002 - Image/video not found

1003 - Unsupported image/video type

1004 - Image/video is too big

URL uploads

If URL specified in url parameter points to any media located on Imageshack/Yfrog servers (following forms are supported:

and this media belong to you (caller) then no extra transload will be performed, you'll have a link to the existing media.


Sign in to add a comment
Hosted by Google Code