Content Submisson
Cheezburger Content Submission API
General Workflow
- Step 1. Get a valid authentication token for your user. (Optional)
- Step 2. Post your picture (without captions) Execute an HTTP POST to this url
- Step 3. Post your LOL (with caption) Using the PictureID from your Picture Post Response, execute an HTTP POST to this url
- Step 4. Add Lol To Voting Pool (optional) Of the thousands of lol submissions posted to the Cheezburger Network every day, only a handful wind up on the front page of any of the cheezburger network sites. We use voting as a way of letting our users select the very best of the best. By default, newly created lols do not appear in the voting system and cannot make it to the front page. If you would like to submit your lols for voting, you can add them to the voting pool by sending a simple XML POST request to the voting pool end point.
This API uses a token-based system for determining if a user has logged in and given a particular API client permission to access their account information. You can get an Authentication Token for your users by using our Authentication Session end point (see below). If you include the authentication token in the HTTP request header, all pictures and lols uploaded will be associated with the corresponding user's account.
http://api.cheezburger.com/xml/picture
With XML in the following format
<?xml version="1.0" encoding="utf-8"?>
<EncodedPicture>
<Title>Picture Title (optional)</Title>
<Description>Picture Description (optional)</Description>
<Attribution>Picture By (optional)</Attribution>
<AttributionUrl />
<Base64EncodedImage>Example Base 64 Image</Base64EncodedImage>
</EncodedPicture>
You should get the following output as a response.
<?xml version="1.0" encoding="utf-8"?>
<PictureResponse>
<PictureId>http://api.cheezburger.com/xml/picture/5000</PictureId>
</PictureResponse>
Note: For FailBlog, GraphJam, Engrish Funny, and Comixed submissions, step 2 is optional. Please see the Image Type documentation.
http://api.cheezburger.com/xml/lol
With XML in the following format
<?xml version="1.0" encoding="utf-8"?>
<EncodedLol>
<FullText>Full Text of All captions on Lol (for search)</FullText>
<PictureId>http://api.cheezburger.com/xml/picture/1</PictureId>
<Title>Lol Title</Title>
<Description>Lol Description (optional)</Description>
<EmailAddress>Email Address (optional, not displayed)</EmailAddress>
<Name>Your name (optional, for caption credit)</Name>
<Base64EncodedImage>Base 64 Encoded Image Here</Base64EncodedImage>
</EncodedLol>
And you should get the following output
<?xml version="1.0" encoding="utf-8"?>
<LolResponse>
<LolId>http://api.cheezburger.com/xml/lol/1001</LolId>
<LolImageUrl>http://cheezburger.com/images/picture.jpg</LolImageUrl>
<ThumbnailImageUrl>http://cheezburger.com/images/th_picture.jpg</ThumbnailImageUrl>
<LolPageUrl>http://cheezburger.com/View/12345</LolPageUrl>
</LolResponse>
Note: As an alternative to sending the Base64 encoded image, you can send along an XML representation of the text to use as a caption. For more details on that, consult the Caption API documentation.
Using the LolId from Lol post response, execute an HTTP POST to this url
http://api.cheezburger.com/xml/votingpool
In the following format:
<?xml version="1.0" encoding="utf-8"?>
<VotingPoolSubmission>
<LolId>http://api.cheezburger.com/xml/lol/2002</LolId>
</VotingPoolSubmission>
Image Encodings in XML Documents
Both the Picture and Lol end points expect Base64 encoded images in the XML HTTP POSTS. Below are examples of two Base64 Encoded Strings which you can use for your testing. Example Base64 Encoded Picture (Non-Captioned)
Example Base64 Encoded Lol (Captioned Picture)
0 Comments
New comments are not being accepted at this time.