Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

This branch is 41 commits behind mixi-inc:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
src/clj_mixi_graph_api
test/clj_mixi_graph_api/test
.gitignore
README.markdown
project.clj

README.markdown

clj-mixi-graph-api

Clojure sample for using mixi Graph API.

Usage

  1. Leiningen を入れる

https://github.com/technomancy/leiningen

  1. ConsumeKey と ConsumerSecret 及び、必要があれば RedirectUri を書き換える

    (def consumer-info {:key "xxxxxxxxxxxxxxxxxxxx" :secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" :redirect-uri "https://mixi.jp/connect_authorize_success.html"})

  2. 依存を解決する

    % lein deps

  3. REPLで実行する

request-access-token にはユーザーの認可で得た authorization code を渡してください。

% lein repl
clj-mixi-graph-api.core=> (def first-token (get-token (request-access-token "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")))
clj-mixi-graph-api.core=> (get-my-friends first-token)
clj-mixi-graph-api.core=> (def refreshed-token (get-token (refresh-access-token (:refresh-token first-token))))
clj-mixi-graph-api.core=> (get-my-friends refreshed-token)
Something went wrong with that request. Please try again.