Mixi/アプリ開発/準備
提供: 初心者エンジニアの簡易メモ
目次
mixiアプリDeveloperコミュニティ登録
http://mixi.jp/view_community.pl?id=3217244 (登録しないとデータがないと表示される)
Developer登録をする
https://mixi.jp/guide_developer.pl
開発環境へログイン
halloworld.xml
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Hello, world!">
<Require feature="opensocial-0.8" />
</ModulePrefs>
<Content type="html"><![CDATA[
<div>Hello, <span id="target"></span>!</div>
<script type="text/javascript">
function init() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.VIEWER), "viewer");
req.send(function(data) {
var viewer = data.get("viewer").getData();
var id = viewer.getId();
var name = viewer.getDisplayName();
document.getElementById("target").innerHTML = name;
});
}
gadgets.util.registerOnLoadHandler(init);
</script>
]]></Content>
</Module>
ガジェットXML登録
アプリ作成から作成したガジェットXMLのURLを設定する
公開
カテゴリ掲載申請をする(10人以上の利用者登録が必要
デベロッパーセンター
http://developer.mixi.co.jp/appli/spec/pc/helloword_of_mixi_app
apiをキャッシュさせない方法
urlパラメータに以下を追加
nocache=1
注意
- 既に他で公開してるアプリなどは審査に通らない
