Metadata/en
目录 |
Weibo with metadata
Metadata can be event, character, place etc. It can be detected by other applications and search engine. With this information, developer can develop kinds of different applications.
When you create a weibo, you can attach one or more metadata to this weibo. These data is a structured information about his weibo. You can choose the content, but the data struct and grammar should follows the standard.
Example:
… "annotations": [ {"movie": { "title": "Wall Street", "url": "http://video.sina.com.cn/m/gsd_61145667.html", "text": "Wall Street: Money Never Sleeps"}}], …
Weibo Metadata Format
Metadata is constructed by type, attribute and value:
"annotations": [{"type": {"attribute": "value"}}]
One attribute corresponds one value, one type can have many attributes, one weibo can have many types.
"annotations": [ {"type": { "another_attribute": "value", "attribute": "value"}}, {"type": { "another_attribute": "value", "attribute": "value"}}]
type
TYPE | Description |
webpage | webpage with text, picture, news, blogs |
product | product information |
video | video information |
movie | movie information |
song | song information |
people | people information |
place | Geo information |
review | review information |
restaurant | restaurant inforamtion |
book | book information |
stock | stock information |
event | event information |
vote | vote statistics information |
pay | payment information |
job | jobs information |
game | game information |
app | application information |
attribute
general attribute
all the attributes can use these field:
Attribute | Value |
title | title |
image | image |
url | URL |
text | test |
type attribute
Different types have different meanings, and many type attributes can be used together.
webpage
Attribute | Value |
title | title |
image | image |
url | url of the metadata |
product
Attribute | value |
brand | brand of the product |
model | model |
price | pricel, including Dollar sign |
origin | place of origin |
category | category |
video
Attribute | Value |
title | title of the video |
url | URL of the video |
player_url | URL of the video player |
movie
Attribute | Value |
title | movie title/td> |
url | URL of the movie webpage |
director | director name |
year | produced yeah, format:YYYY |
song
Attribute | Value |
title | music title |
url | URL of introducing webpage |
artist | artist |
year | producing year, format:YYYY |
genre | music type |
album | album |
people
Attribute | Value |
title | name |
url | URL of introducing page of the person |
hometown | hometown |
birthday | birthday, format: MM/DD/YYYY |
place
Attribute | Value |
title | Place name |
url | URL of introducing webpage |
street_address | street address |
locality | district, county |
region | province, city |
postal_code | ZIP code |
country_name | country name |
phone | phone number |
latitude | latitude |
longitude | longitude |
review
Attribute | Value |
content | content |
rating | rating. 3/5 starts is "0.6” |
url | url |
restaurant
Attribute | Value |
cuisine | cuisine |
pricerange | average price per person. format: ¥nn-¥mm |
book
Attribute | Value |
isbn | ISBN number of the book |
author | author |
publisher | publisher |
year | publishing year. format: YYYY |
stock
Attribute | Value |
symbol | symbol |
price | Price, including the Dollar sign: ¥nnn.nn |
event
Attribute | Value |
location | location |
start_date | starting date |
end_date | end date |
vote
Attribute | Value |
option | options of the vote |
count | count |
pay
Attribute | Value |
seller | Seller |
end_date | end date |
price | price, including Dollar sign, eg: ¥nnn.nn |
discount | discount, nn% or ¥nnn.nn |
job
Attribute | Value |
company | company |
duties | duties |
game
Attribute | Value |
manufacturer | manufacturer |
platform | platform, eg: PC、PSP |
app
Attribute | Value |
author | author of the application |
tags | tags |
category | category |
rating | rating, 3/5 stars is “0.6” |
Metadata Limitation
The length of metadata can't be more than 512 characters.
Currently, we only support JSON.
JSON:
[{"type": {"attribute": "value"}}]
Weibo with metadata
An example of weibo with metadata
{ "created_at":"Fri Jul 30 14:01:57 +0800 2010", "id":1413384253, "text":"playing with cURL and the Sina API", "source":"<a href=\"http://open.t.sina.com.cn/wiki/index.php/SDK/\" rel=\"nofollow\">dabr for weibo</a>", "favorited":false, "truncated":false, "in_reply_to_status_id":"", "in_reply_to_user_id":"", "in_reply_to_screen_name":"", "geo":null, "user":{ "id":10506, "screen_name":"hustfisher", "name":"hustfisher", "province":"44", "city":"1", "location":"广东 广州", "description":"", "url":"", "profile_image_url":"http://tp3.sinaimg.cn/10506/50/0","domain":"", "gender":"m", "followers_count":8, "friends_count":39, "statuses_count":169, "favourites_count":0, "created_at":"Tue Oct 20 00:00:00 +0800 2009", "following":false, "allow_all_act_msg":false, "geo_enabled":false, "verified":false }, "annotations":[ {"type":{"attribute":"value","another_attribute":"value"}}, {"another_type":{"attribute":"value"}} ] }