">mixi Developer Center (mDC)

mixi Connect

mixi Connect (English) » mixi Graph API » Technical Specification » Check API

Check API

When a website has mixi-check-button which is provided by mixi Plugin, the user will
be able to share thought with anyone about its page and feelings for the page with user’s comment.
By the way, in addition to the method to have button pushed by user,
don’t you want the method to post implicitly by the result of user action on the web page?

In such a case, you should use Check API which is provided by mixi Graph API. This section describes how to use Check API.

What you need in advance

You must have got the following information to use Check API.

  • An identification key for mixi-check.
  • The access token authorized for the "w_share" or "r_share" scope

When posting for mixi-check, you must get an identification key for mixi-check in advance.
Please look at the mixi-check service management’s page for a step to issue it.

If you use the access token which was authorized in scope except above, you won’t be able to access to Check API.
Please look at the Certification Authorization Procedure’s page for how to get the access token.

Scope Function
w_share Post for mixi Check.
r_share Retrieve an information of counts about a "favorite".

Post for mixi-check

The client accesses to “https://api.mixi-platform.com/2/share” to post a mixi-check.
The URI has the following specification.

POST https://api.mixi-platform.com/2/share

You have to specify posted contents by JSON format in HTTP Request Body. “application/json” and
“charset” is specified on “Content-Type” request header.
For example, in the case of UTF-8, it is “application/json; charset=utf-8″.

The JSON consists of only one object. Its property is as follows.

Parameter Description Notes
key Specify an identification key for mixi-check Required
privacy Specify a public range It has default variable
title Brief character string of object Required
description Description of object  
comment User’s comment  
content_rating Limit over 18 is “1″  
image Thumbnail’s URL  
primary_url Reference URL (*1) Required
pc_url URL for PC’s page  
smartphone_url URL for smart phone’s page  
mobile_url URL for mobile(all career) (*2)
mobile_docomo_url URL for mobile(Docomo) (*2)
mobile_au_url URL for mobile(au) (*2)
mobile_softbank_url URL for mobile(softbank) (*2)

(*1) primary_url is used to distinguish “the object which was checked”. Among individual check, if there are check which has same primary_url, these are treated as the same things.
(*2) If you want to display on mobile page also, you must choose at least one from the URL for mobile.

As far as there is not especially reference, each property-value’s detail and its limit base on the specification for pc.

Format of “privacy”

“privacy” parameter’s value to specify a public range is written by an object format.
Their properties are as follows.

visibility

Required. Specify any of the following.

  • “friends_of_friends” : To the friend of the friend
  • “friends” : To the friend
  • “top_friends” : To the good friend
  • “group” : To the specific group
  • “self” : Closed

group

It is required as long as “visibility” is “group”. The value is the ID of the public group.

  • You can specify only one of groups in Check API.
  • Groups API provide group ID.

Sample of HTTP Request and HTTP Response

For example, HTTP POST Request is as follows.

POST https://api.mixi-platform.com/2/share
Host: api.mixi-platform.com
Authorization: OAuth ...
Content-Length: 114
Content-Type: application/json; charset=utf8

{"primary_url":"https://example.com/index.html",
 "title":"My first check",
 "privacy":{"visibility":"friends"},
 "key":"daf74328ec4d34f74663b30c0ddd93bed7aa816d"}

When there is no problem about request, you will get status code 200.

HTTP/1.1 200 OK

Acquiring an information of a "favorite" API

Abstract

This API allows you to acquire a count of a "favorite" or mixi Check. The URI to retrieve it is the following:

GET https://api.mixi-platform.com/2/share?primaryUrl=http://demo.com/example.html

The following parameters can be specified for the above URI.

Parameter name Description Note
primaryUrl The URL of an posted target. Required.
fields Specify fields which a developer want to acquire separated by a comma. Field names "allCount, favoriteCount, feedbackCount, commentCount, checkCount" are available. If this fields parameter is ommitted, then the "allCount" will be specified automatically. In addition, the developer can specify a field name "@all" as this value for retrieving all fields. Optional.

Response format

If this request is successfully, the following response will be returned as the content type "application/json". And, The HTTP status code will be 200.

Property Description
allCount The count of all communications.
favoriteCount The count of all "favorite".
feedbackCount The count of all feedbacks.
commentCount The count of all comments.
checkCount The count of all checked.

Example)

{
  "allCount": "16"
  "favoriteCount": "3",
  "checkCount": "5",
  "feedbackCount": "4",
  "commentCount": "4"
}

 

TOP OF THIS PAGE