an introduction to mixi graph api

31
An Introduction to mixi API

Upload: mixiplatform

Post on 18-Dec-2014

2.715 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: An introduction to mixi Graph API

An Introduction to mixi API

Page 2: An introduction to mixi Graph API

2

Copyright (C) mixi, Inc. All rights reserved.

Regarding mixi API

Page 3: An introduction to mixi Graph API

3

mixi

Copyright (C) mixi, Inc. All rights reserved.

About mixi Apps API & mixi Graph API

mixi PlatformBase to create mixi application and services using the social graph ・ mixi Graph API   API that can be used by Web services or from various devices ・ mixi Apps   An application that runs inside mixi ( e.g. Sunshine Bokujyo)

Web service

Application

mixi Applications

mixi Graph API

mixi Apps API

Page 4: An introduction to mixi Graph API

4

Copyright (C) mixi, Inc. All rights reserved.

List of mixi Graph API (http://developer.mixi.co.jp/en/connect/mixi_graph_api/mixi_io_spec_top/)

Category API API capabilities

Profile related People API Can acquire information or IDs of a user or his/her friends

Groups API Can acquire information on the groups the user manages. (e.g. name of the group, group ID).

People lookup API

Can find the user IDs for a friend by searching using an email address

Profile Image API

Can acquire profile pictures for a user or his//her friends. Also this API allows user to modify his/her own profile picture

Content Voice API Can post and acquire mixi Voice posts

Diary API Can post a diary entry

Photo API Can acquire and post photos in the mixi albums

Check-in API Can acquire and post check-in information

Information Updates

Updates API Can acquire friend updates

Check API Can post the mixi check feed

Message Message API Can send and acquire messages to and from friends

The following API are the available mixi Graph API for developers to use. By using the relevant API, a developer can create a highly social experience for users.

Page 5: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

5

List of mixi Apps API (http://developer.mixi.co.jp/en/appli/spec/)  

Category API API capabilities

Profile related People API Can acquire information or IDs of a user or his/her friends

Content Photo API Can acquire and post photos in the mixi albums

Voice API ( posting only )

Can post mixi Voice posts

Community API Can acquire information on what types of mixi communities the user participates in

Notification Message API ( Sending only )

Can send messages to friends

Request API Can send requests to friends

Invite API Can send friends invitations to a particular app

Communication Feed API Can inform friends of a user’s actions performed in an application

Storing data Persistence API Can save and acquire user information on the mixi server

Payment Payment API Allows the use of the mixi payment system

The following API are the available mixi Apps API for developers to use. By using the relevant API, a developer can create a rich application experience for users.

Page 6: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

6

The difference between mixi Graph and mixi Apps

mixi Graph API : Delivers API that enables various methods to use mixi contentsmixi Apps API : Delivers API that promotes sharing among friends

mix

i G

rap

h A

PI

People API

Groups API

People lookup API

Profile ImageAPI

Voice API

Diary API

Photo API

Check-in API

Updates API

Check API

Message API

Photo APIPeople API

Request APIVoice API ( only posting capability )

Message API( only sending

capability )

Persistence API

Invite API

Payment API

Communication API

Communication Feed API

Mix

i A

pp

s

Profile related

Content Notification Information Updates

Payment

Storing data

Page 7: An introduction to mixi Graph API

7

Copyright (C) mixi, Inc. All rights reserved.

Case examples of using mixi APImixi Graph API version

Page 8: An introduction to mixi Graph API

8

Copyright (C) mixi, Inc. All rights reserved.

Case examples of using mixi API ( mixi Graph API version )

People API can be used to acquire a list of mixi friends for a user and then a “follow” function can be built into the application to

promote further engagement among friends

machi

Page 9: An introduction to mixi Graph API

9

Copyright (C) mixi, Inc. All rights reserved.

Case examples of using mixi API ( mixi Graph API version )

The Message API can be used to allow users to invite their friends to start using a particular application

Page 10: An introduction to mixi Graph API

10

Copyright (C) mixi, Inc. All rights reserved.

Case examples of using mixi API ( mixi Graph API version )

Voice API can be used to allow users to post photos using mixi Voice. A link can be added within the mixi Voice post to redirect

users to the application.

Page 11: An introduction to mixi Graph API

11

Copyright (C) mixi, Inc. All rights reserved.

Case examples of using mixi API ( mixi Graph API version )

With the combination of mixi API: People API ・ Voice API ・ Updates API and an externally developed API there are many possibilities. For instance if a text analyzer API existed it could be used with the mixi API to analyze and convey the emotion of a user’s posts

People API

Updates API

Text Analyzer API

・ General information of friends

・ Friend’s recent mixi Voice posts

・ mixi Voice test analyzer

【 Emotional Voice】

Page 12: An introduction to mixi Graph API

12

Copyright (C) mixi, Inc. All rights reserved.

Case examples of using mixi API ( mixi Graph API version )

The Profile Image API can be used to easily update a user’s profile picture straight from an external application

Page 13: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

13

An introduction of mixi API SDK

Page 14: An introduction to mixi Graph API

○ Official library for the native application on

smartphones

○ Makes it easier to access mixi API○ mixi Graph API○ mixi Apps

○ OS ○ Android○ iOS

Copyright (C) mixi, Inc. All rights reserved.

14

What is the mixi API SDK?

Page 15: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

15

What is the mixi API SDK?

mixi Graph API mixi Apps API

mixi API SDK

API

Library

Apps /Service

mixi AppsExternal Service Smartphone native app

Page 16: An introduction to mixi Graph API

○ SDK supports the OAuth2.0 authorization○ The access token can be acquired by calling just 1

method○ The SDK also automatically refreshes (reissues) the

access token

○ Secure○ For Android, there is no need to add a secret

○ Not only can the SDK be added to new application but the SDK can be added to existing applications as well

Copyright (C) mixi, Inc. All rights reserved.

16

mixi API SDK features

Features

Page 17: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

17

OAuth2.0 Flow

User Application mixi

Starts using the application

Access token acquired

Token

code

User Authorization

code

Authorization code issued

Token

Access token issued

Page 18: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

18

Flow of SDK approval

User Application

Starts to use the application

Access Token Acquired

Token

User Authorization

SDK

Page 19: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

19

Flow of SDK approval ( diagram of SDK’s intermediary function )

User Application mixi

Token

Access token acquired

Token

code

SDK

Access token issued

Authorization code issued

SDK

SDK code

SDK Token

Starts to use the application

User Authorization

Page 20: An introduction to mixi Graph API

○ Official library for the native application on

smartphones○ Android○ iOS

○ Facilitates the use of mixi API

○ Supports OAuth2.0○ Not only can the SDK be added to new application

but the SDK can be added to existing applications as well

Copyright (C) mixi, Inc. All rights reserved.

20

mixi API SDK summary

Features

Why not take it for a test drive?♪

Page 21: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

21

demo

Page 22: An introduction to mixi Graph API

○ mixi Voice post

○ Supports posts which include photos○ Since mixi saves the photos, there is no need to keep a

separate storage of photos

Copyright (C) mixi, Inc. All rights reserved.

22

demo

Voice API

Page 23: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

23

Voice API

mixi Graph API mixi Apps API

mixi API SDK

API

Library

App /Service

mixi AppsExternal Service Smartphone native app

Voice API

Page 24: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

24

demo

Easily post a mixi Voice using the SDK☆

Page 25: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

25

Coding example using the SDK (for Android)

Authorization

mContainer.authorize(TestActivity.this, new String[] {"r_profile","w_voice"},

CODE,

new CallbackListener() {

@Override

public void onComplete(Bundle values) {

// Success

}

});

Page 26: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

26

Posting a mixi Voice

Map params = new HashMap();

params.put("status", “HELLO");

mContainer.send("/voice/statuses/update", HttpMethod.POST, params, new

Callback() {

@Override

public void onComplete(Bundle values) {

// Success

}

});

Coding example using the SDK (for Android)

Page 27: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

27

demo

Easily post a mixi Voice using mixi

Graph☆

Page 28: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

28

Voice API

Posting a mixi Voice

Parameter Value

status mixi Voice body, contents ( URI encoded withUTF-8 )

POST

http://api.mixi-platform.com/2/voice/statuses/update

POST http://api.mixi-platform.com/2/voice/statuses

curl -v -H ‘Authorization: OAuth 【 please include your access

token】 ' \

-d 'status=%E3%81%8A%E7%96%B2%E3%82%8C

%E3%81%95%E3%81%BE%E3%83%BC' \

'http://api.mixi-platform.com/2/voice/statuses/update'

Use curl to post“Thanks for your help”using mixi Voice

Page 29: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

29

【 For reference 】 Acquiring an access token

①Register the application and acquire the credential information of the application http://developer.mixi.co.jp

http://mixi.jp/connect_authorize.pl?client_id=【 include your

Consumer key】&type=web_server&scope=r_voice w_voice

②Get authorization from the user. Access using the browser with the following

※This example is for getting authorization for posting and acquiring a mixi Voice post

If users select“Agree” they are redirected to the redirect URL of the application

パラメータ名 値code Authorization code

Page 30: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.

30

【 For reference 】 Acquiring an access token

curl 'https://secure.mixi-platform.com/2/token' \

-d 'grant_type=authorization_code' \

-d ‘client_id=【 insert Consumer key here】 ' \

-d ‘client_secret=【 insert Consumer secret here】 ' \

-d ‘code=【 Please insert the Authorization code acquired from step

2】 ' \

-d ‘redirect_uri=【 Please include the redirect link here】 '

③Acquire the access token

For more information please refer to the following webpagehttp://developer.mixi.co.jp/connect/mixi_graph_api/api_auth/

Page 31: An introduction to mixi Graph API

Copyright (C) mixi, Inc. All rights reserved.