API Documentation

Feeling RESTful?

API v2 » comments/show (GET)

Description

This method returns comments for the specified image. BETA

URL

http://api.twitpic.com/2/comments/show.format

Available Formats

xml, json, jsonp

HTTP Method

GET

Requires Authentication

False

Parameters

  • media_id (Required): The id of the media
  • page (Required): The comment page (25 comments shown per page)

Responses

Sample XML Response

	
	<?xml version="1.0" encoding="UTF-8"?>
	<comments>
	    <total_comments>2</total_comments>
	    <total_pages>1</total_pages>
	    <comment>
	        <id>23917165</id>
	        <user_id>620157</user_id>
	        <message>Comment Message</message>
	        <timestamp>2010-03-19 15:58:46</timestamp>
	        <user>
	            <id>620157</id>
	            <twitter_id>15048632</twitter_id>
	            <username>Twitpic</username>
	            <name>Twitpic</name>
	            <location></location>
	            <website></website>
	            <bio></bio>
	            <avatar_url></avatar_url>
	            <profile_background_color>FE95E0</profile_background_color>
	            <profile_text_color>FF29C6</profile_text_color>
	            <profile_link_color>FF29C6</profile_link_color>
	            <profile_sidebar_fill_color>FE95E0</profile_sidebar_fill_color>
	            <profile_background_image_url></profile_background_image_url>
	            <profile_background_tile>0</profile_background_tile>
	            <utc_offset>-21600</utc_offset>
	            <geo_enabled>0</geo_enabled>
	            <public_updates>1</public_updates>
	            <public_tagging>0</public_tagging>
	            <banned>0</banned>
	            <timestamp>2009-03-23 21:05:22</timestamp>
	            <events />
	            <images />
	        </user>
	    </comment>
	    <comment>
	        <id>23380038</id>
	        <user_id>5514141</user_id>
	        <message>Comment Message</message>
	        <timestamp>2010-03-13 16:13:15</timestamp>
	        <user>
	            <id>5514141</id>
	            <twitter_id>70131878</twitter_id>
	            <username>Twitpic Test</username>
	            <name></name>
	            <location></location>
	            <website></website>
	            <bio></bio>
	            <avatar_url></avatar_url>
	            <profile_background_color></profile_background_color>
	            <profile_text_color>333333</profile_text_color>
	            <profile_link_color>000000</profile_link_color>
	            <profile_sidebar_fill_color>12b0ff</profile_sidebar_fill_color>
	            <profile_background_image_url></profile_background_image_url>
	            <profile_background_tile>0</profile_background_tile>
	            <utc_offset>19800</utc_offset>
	            <geo_enabled>0</geo_enabled>
	            <public_updates>1</public_updates>
	            <public_tagging>1</public_tagging>
	            <banned>0</banned>
	            <timestamp>2009-11-26 07:49:02</timestamp>
	            <events />
	            <images />
	        </user>
	    </comment>
	</comments>	

Sample JSON Response

	
	{
	   "total_comments":"2",
	   "total_pages":1,
	   "comments":[
	      {
	         "id":"23917165",
	         "user_id":"620157",
	         "message":"test",
	         "timestamp":"2010-03-19 15:58:46",
	         "user":{
	            "id":"620157",
	            "twitter_id":"15048632",
	            "username":"twitpicuser",
	            "name":"User",
	            "location":"United States",
	            "website":"http:\/\/www.facebook.com\/LilBit0318",
	            "bio":"Just a user",
	            "avatar_url":"http:\/\/a3.twimg.com\/profile_images\/745155463\/26639772_normal.jpg",
	            "profile_background_color":"FE95E0",
	            "profile_text_color":"FF29C6",
	            "profile_link_color":"FF29C6",
	            "profile_sidebar_fill_color":"FE95E0",
	            "profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/17251743\/2zdvot3.png",
	            "profile_background_tile":"0",
	            "utc_offset":"-21600",
	            "geo_enabled":"0",
	            "public_updates":"1",
	            "public_tagging":"0",
	            "banned":"0",
	            "timestamp":"2009-03-23 21:05:22",
	            "events":null,
	            "images":null,
	            "places":null
	         }
	      },
	      {
	         "id":"23380038",
	         "user_id":"38974",
	         "message":"Great photo!",
	         "timestamp":"2010-03-13 16:13:15",
	         "user":{
	            "id":"38974",
	            "twitter_id":"70131878",
	            "username":"anotheruser",
	            "name":"Another User",
	            "location":"Earth",
	            "website":"http:\/\/AftabCPCheats.Tk",
	            "bio":"Just a dude.",
	            "avatar_url":"http:\/\/a3.twimg.com\/profile_images\/1013809731\/1ccb5087-ecbf-45d9-b313-2485ee691bb6_normal.png",
	            "profile_background_color":"000000",
	            "profile_text_color":"333333",
	            "profile_link_color":"000000",
	            "profile_sidebar_fill_color":"12b0ff",
	            "profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/104952733\/new_bggg_copy.pngjma.png",
	            "profile_background_tile":"0",
	            "utc_offset":"19800",
	            "geo_enabled":"0",
	            "public_updates":"1",
	            "public_tagging":"1",
	            "banned":"0",
	            "timestamp":"2009-11-26 07:49:02",
	            "events":null,
	            "images":null,
	            "places":null
	         }
	      }]
	}	

Example CURL Command

	curl -v "http://api.twitpic.com/2/comments/show.json?media_id=hbmy&page=1"