Comments API
The Comments API is a collection of API calls that allow you to leverage the power of TweetMeme’s commenting system on your own platform.
Methods
Comment Firehose
Returns the most recent comments posted on TweetMeme, along with information on which URL they were posted on. Note: This page is cached for 60 seconds – polling any more often than that will result in your API usage quota being used up.
URL: http://api.tweetmeme.com/comments/firehose.format
Formats: xml, json, php
Parameters: None
Returns: a list of comments
- id: int the unique ID for the comment
- text: string the comment itself
- Note: URLs are replaced with #{x}# where x is the media id for the URL (see media section)
- url_id: int the TweetMeme URL ID to which this comment refers
- retweets: int the number of retweets the comment has had
- user_id: int the TweetMeme User Id of the user
- created_at: datetime the date and time the comment was made
- (optional) media: media objects containing information on links in the comments (may not be returned if no links in comment)
- id: int the TweetMeme Unique Id for the link
- url: string the final URL for the link
- alias: string a short URL for the link
- title: string the title of the page
- text: string a text excerpt from the page or a tweet about the page
- url_count: int the number of retweets the link has had
- comment_count: int the number of TweetMeme comments the page has had
- media_type: int the media type of the story (news/image/video)
- created_at: datetime the datetime of the first tweet about the story
- media_thumb: string the URL of a thumbnail of the media, 0 if unavailable
- user: a user object containing data on the user who made the comment
- id: int the TweetMeme User Id
- tweeter: string the Twitter Username of the user
- url: string the profile picture of the user
- story: a story object containing data on the story the comment was posted on
- url: string the URL of the story
- title: string the title of the page the URL points to
- url_count: int the number of retweets the story has
- comment_count: int the number of total comments the story has had
- url: string the direct URL to link to the comment
Example Requests:
- http://api.tweetmeme.com/comments/firehose
- http://api.tweetmeme.com/comments/firehose.json
Example Output (in XML) Note: This example has been trimmed, there were actually 100 <comment> elements in the response to this request.
<comments>
<comment>
<id>8227</id>
<text>I've been looking forward to accessing #{1}# from my xbox</text>
<url_id>213860974</url_id>
<retweets>0</retweets>
<user_id>14799427</user_id>
<created_at>2009-10-12 14:27:51</created_at>
<media>
<medi>
<id>12936914</id>
<url>http://twitter.com</url>
<alias>http://is.gd/52q</alias>
<title>Twitter</title>
<text>From David Wilson, MSW (social worker) and 20 year military (retired) veteran Douglass H. http://tinyurl.com/co98n9</text>
<url_count>16325</url_count>
<comment_count>0</comment_count>
<media_type>news</media_type>
<created_at>2009-02-19 07:22:06</created_at>
<media_thumb>0</media_thumb>
</medi>
...
</media>
<user>
<id>14799427</id>
<tweeter>chris_alexander</tweeter>
<url>http://a3.twimg.com/profile_images/213713081/Portrait-med_normal.jpg</url>
</user>
<story>
<url>http://www.techradar.com/news/gaming/facebook-and-twitter-on-xbox-live-november-19-642049</url>
<title>Facebook and Twitter on Xbox Live November 19 | News | TechRadar UK</title>
<url_count>76</url_count>
<comment_count>1</comment_count>
</story>
<url>http://tweetmeme.com/comment/213860974-8227</url>
</comment>
...
</comments>
Notes
- The number of comments that are displayed per minute will vary as we have changing comment volumes. We will try to include all comments posted on TweetMeme in this firehose.
Comments for URL
Returns comments posted on a particular URL
URL: http://api.tweetmeme.com/comments/get_url.format
Formats: xml, json, php
Parameters:
- url: string the full URL to get comments for
Returns: a list of comments
- id: int the unique ID for the comment
- text: string the comment itself
- Note: URLs are replaced with #{x}# where x is the media id for the URL (see media section)
- url_id: int the TweetMeme URL ID to which this comment refers
- retweets: int the number of retweets the comment has had
- user_id: int the TweetMeme User Id of the user
- created_at: datetime the date and time the comment was made
- (optional) media: media objects containing information on links in the comments (may not be returned if no links in comment)
- id: int the TweetMeme Unique Id for the link
- url: string the final URL for the link
- alias: string a short URL for the link
- title: string the title of the page
- text: string a text excerpt from the page or a tweet about the page
- url_count: int the number of retweets the link has had
- comment_count: int the number of TweetMeme comments the page has had
- media_type: int the media type of the story (news/image/video)
- created_at: datetime the datetime of the first tweet about the story
- media_thumb: string the URL of a thumbnail of the media, 0 if unavailable
- user: a user object containing data on the user who made the comment
- id: int the TweetMeme User Id
- tweeter: string the Twitter Username of the user
- url: string the profile picture of the user
- story: a story object containing data on the story the comment was posted on
- url: string the URL of the story
- title: string the title of the page the URL points to
- url_count: int the number of retweets the story has
- comment_count: int the number of total comments the story has had
- url: string the direct URL to link to the comment
Example Requests:
- http://api.tweetmeme.com/comments/get_url?url=http://www.amiando.com/ldntwestival.html
- http://api.tweetmeme.com/comments/get_url.json?url=http://tweetmeme.com
Example Output (in XML) Note: This example has been trimmed, there were actually 100 <comment> elements in the response to this request.
<result> <status>success</status> <comments> <comment> <id>2361</id> <text>Well, Actually I don't know about this well. But Really love to use this tweet button on my website. I think i gotta work out more!!!</text> <url_id>26054116</url_id> <retweets>1</retweets> <user_id>288182720</user_id> <created_at>2009-09-15 06:47:20</created_at> <user> <id>288182720</id> <tweeter>luwislinn</tweeter> <url>http://s.twimg.com/a/1254440757/images/default_profile_1_normal.png</url> </user> <story> <url>http://www.tweetmeme.com/</url> <title>Tweetmeme - Hottest Stories on Twitter</title> <url_count>2533</url_count> <comment_count>44</comment_count> </story> <url>http://tweetmeme.com/comment/26054116-2361</url> </comment> </comments> </result>



(5 votes, average: 3.80 out of 5)