{"id":42,"date":"2012-04-19T01:36:34","date_gmt":"2012-04-18T16:36:34","guid":{"rendered":"http:\/\/blog.tkouen.mydns.jp\/wordpress\/?p=42"},"modified":"2012-04-19T01:36:34","modified_gmt":"2012-04-18T16:36:34","slug":"mixi%e3%83%9f%e3%82%af%e3%82%b7%e3%83%bc%e3%83%9a%e3%83%bc%e3%82%b8%e3%82%a2%e3%83%97%e3%83%aa%e3%83%bb%e3%83%bb%e3%83%bbpage","status":"publish","type":"post","link":"https:\/\/devlog.nb3.jp\/wordpress\/42","title":{"rendered":"[mixi]\u30df\u30af\u30b7\u30fc\u30da\u30fc\u30b8\u30a2\u30d7\u30ea\u30fb\u30fb\u30fb[page]"},"content":{"rendered":"<p>\u304a\u4ed5\u4e8b\u95a2\u4fc2\u3067mixi\u30da\u30fc\u30b8\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u3053\u3068\u306b\u306a\u3063\u305f\u3088\uff1b\uff3f\uff1b<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u500b\u4eba\u3067\u30d1\u30fc\u30c8\u30ca\u30fc\u767b\u9332\u30fb\u30fb\u30fb<br \/>\n\u30af\u30ec\u30ab\u304c\u3044\u308b\u306e\u304borz<br \/>\n\u3068\u304b\u601d\u3063\u305f\u308a\u3057\u306a\u304c\u3089\u767b\u9332\uff01<\/p>\n<p><span style=\"color: #666699;\">\u203b\u3042\u3068\u3001\u6cd5\u4eba\u306e\u5834\u5408\u306f\u767b\u8a18\u7c3f\u3092\u90f5\u9001\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u304b\u30fb\u30fb\u30fb<\/span><br \/>\n<span style=\"color: #666699;\"> \u3060\u304b\u3089\u6577\u5c45\u304c\u9ad8\u3059\u304e\u3066\u307f\u3093\u306a\u3084\u308b\u6c17\u304c\u306a\u304f\u306a\u308b\u3093\u3060\u3088\u3068\u304b\u601d\u3063\u305f\u308a\u3082\u3057\u3066\u308b\u30fb\u30fb\u30fb<\/span><br \/>\n<a href=\"http:\/\/developer.mixi.co.jp\/about-platform\/com\/partner\/\" target=\"_blank\">http:\/\/developer.mixi.co.jp\/about-platform\/com\/partner\/<\/a><\/p>\n<p>\u3068\u306b\u304b\u304f\u8272\u3005\u89e6\u308a\u306a\u304c\u3089\u3084\u3063\u3066\u307f\u306a\u3044\u3068\u308f\u304b\u3089\u306a\u3044\u30b3\u30c8\u3060\u3089\u3051\u3067\u3001\u6b63\u76f4\u8f9b\u304b\u3063\u305f\uff1b\uff3f\uff1b<br \/>\n<span style=\"color: #666699;\">\u203b\u3084\u308a\u305f\u304f\u306a\u3044\u6c17\u6301\u3061\u3082\u3042\u3063\u3066\u4f59\u8a08\u30fb\u30fb\u30fb<\/span><\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001mixi\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u306e\u4ed5\u69d8\u66f8\uff1f\u306f\u304b\u306a\u308a\u8aad\u307f\u8f9b\u3044\u3002<br \/>\n\u307e\u3060\u3001Facebook\u306e\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u306e\u65b9\u304c\u307e\u3057\u3002<\/p>\n<h1>\u25c6mixi\u30da\u30fc\u30b8\u30a2\u30d7\u30ea\u304b\u3089\u306e\u6295\u7a3f\u306f3\u30d1\u30bf\u30fc\u30f3<\/h1>\n<p>\u4ee5\u4e0b\u306b\u66f8\u3044\u3066\u3042\u308b\u30fb\u30fb\u30fb<br \/>\n<a href=\"http:\/\/developer.mixi.co.jp\/page-apps\/spec\/page-api\/\" target=\"_blank\">http:\/\/developer.mixi.co.jp\/page-apps\/spec\/page-api\/<\/a><\/p>\n<p>method\u306f\u3001POST<br \/>\nURL\u306f\u3001http:\/\/api.mixi-platform.com\/2\/pages\/[Page-ID]\/feeds<br \/>\n[Page-ID]\u306fmixi\u30da\u30fc\u30b8\u306eID<\/p>\n<h2>\uff11\uff0e\u30bf\u30a4\u30c8\u30eb\u3068\u672c\u6587\u306e\u307f\u306e\u6295\u7a3f<\/h2>\n<p>Content-Type:application\/json<br \/>\n\u672c\u5bb6\u3067\u3053\u3093\u306a\u98a8\u306b\u3057\u306a\u3088\u3068\u304b\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1; highlight: []; html-script: false\">{\r\n  &quot;contentUri&quot; : &quot;http:\/\/www.application.com\/id=12345&quot;,\r\n  &quot;title&quot; : &quot;\u30bf\u30a4\u30c8\u30eb&quot;,\r\n  &quot;body&quot; : &quot;\u672c\u6587&quot;,\r\n  &quot;urls&quot; : {\r\n    &quot;pcUrl&quot; : &quot;http:\/\/mixi.jp\/run_page_appli.pl?page_id=0&amp;module_id=0&amp;appParams=%7B%22uid%22%3A%221569%22%7D&quot;,\r\n    &quot;mobileUrl&quot; : &quot;&quot;,\r\n    &quot;smartphoneUrl&quot; : &quot;&quot;,\r\n  },\r\n  &quot;sourceId&quot; : &quot;3&quot;\r\n}<\/pre>\n<p>\u5b9f\u969b\u306b\u4e0a\u8a18\u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u306f\u3057\u307e\u305b\u3093\u3002<br \/>\n\u5b9f\u969b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058<\/p>\n<pre class=\"brush: php; gutter: true; first-line: 1; highlight: []; html-script: false\">&lt;?php\r\n    $page_id = &#039;123456&#039;;\r\n    $url = &#039;http:\/\/api.mixi-platform.com\/2\/pages\/&#039; . $page_id . &#039;\/feeds&#039;;\r\n    $arr_data = array(\r\n        &#039;title&#039; =&gt; \u30bf\u30a4\u30c8\u30eb\u6587\u5b57\u5217,\r\n        &#039;body&#039; =&gt; \u672c\u6587,\r\n    );\r\n    $content = json_encode($arr_data);\r\n    $opt = array(\r\n        &#039;http&#039; =&gt; array(\r\n        &#039;method&#039; =&gt; &#039;POST&#039;,\r\n        &#039;header&#039; =&gt; &#039;Authorization: OAuth &#039;.$access_token.&quot;\\r\\n&quot;.\r\n                    &#039;Content-Type: application\/json&#039;,\r\n        &#039;ignore_errors&#039;=&gt;true,\r\n        &#039;content&#039; =&gt; $content,\r\n    ));\r\n    $data = file_get_contents($url, false, stream_context_create($opt));\r\n    \/\/\u6210\u529f\u3059\u308b\u3068json\u5f62\u5f0f\u3067\u8fd4\u308a\u304c\u3042\u308b\r\n    print_r(json_decode($data, ture));\r\n?&gt;<\/pre>\n<h2>\uff12\uff0e\uff11\u306b\u52a0\u3048\u3001\u30a4\u30e1\u30fc\u30b8\u306eURL\u6307\u5b9a\u306b\u3088\u308b\u30a4\u30e1\u30fc\u30b8\u306e\u6295\u7a3f<\/h2>\n<p>Content-Type:application\/json<br \/>\n\u672c\u5bb6\u3067\u3053\u3093\u306a\u98a8\u306b\u3057\u306a\u3088\u3068\u304b\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1; highlight: []; html-script: false\">{\r\n  &quot;contentUri&quot; : &quot;http:\/\/www.application.com\/id=12345&quot;,\r\n  &quot;title&quot; : &quot;\u30bf\u30a4\u30c8\u30eb&quot;,\r\n  &quot;body&quot; : &quot;\u672c\u6587&quot;,\r\n  &quot;urls&quot; : {\r\n    &quot;pcUrl&quot; : &quot;http:\/\/mixi.jp\/run_page_appli.pl?page_id=0&amp;module_id=0&amp;appParams=%7B%22uid%22%3A%221569%22%7D&quot;,\r\n    &quot;mobileUrl&quot; : &quot;&quot;,\r\n    &quot;smartphoneUrl&quot; : &quot;&quot;,\r\n  },\r\n  &quot;sourceId&quot; : &quot;3&quot;,\r\n  &quot;imageUrls&quot; : [\r\n    &quot;http:\/\/www.imageurl.com\/image\/photo1.jpeg&quot;\r\n  ]\r\n}<\/pre>\n<p>\u5b9f\u969b\u306b\u4e0a\u8a18\u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u306f\u3057\u307e\u305b\u3093\u3002<br \/>\n\u5b9f\u969b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058<\/p>\n<pre class=\"brush: php; gutter: true; first-line: 1; highlight: []; html-script: false\">&lt;?php\r\n    $page_id = &#039;123456&#039;;\r\n    $url = &#039;http:\/\/api.mixi-platform.com\/2\/pages\/&#039; . $page_id . &#039;\/feeds&#039;;\r\n    $arr_data = array(\r\n        &#039;title&#039; =&gt; \u30bf\u30a4\u30c8\u30eb\u6587\u5b57\u5217,\r\n        &#039;body&#039; =&gt; \u672c\u6587,\r\n        &#039;imageUrls&#039; =&gt; array(\r\n            &#039;http:\/\/hogehoge.com\/hage.jpg&#039;\r\n        ),\r\n    );\r\n    $content = json_encode($arr_data);\r\n    $opt = array(\r\n        &#039;http&#039; =&gt; array(\r\n        &#039;method&#039; =&gt; &#039;POST&#039;,\r\n        &#039;header&#039; =&gt; &#039;Authorization: OAuth &#039;.$access_token.&quot;\\r\\n&quot;.\r\n                    &#039;Content-Type: application\/json&#039;,\r\n        &#039;ignore_errors&#039;=&gt;true,\r\n        &#039;content&#039; =&gt; $content,\r\n    ));\r\n    $data = file_get_contents($url, false, stream_context_create($opt));\r\n    \/\/\u6210\u529f\u3059\u308b\u3068json\u5f62\u5f0f\u3067\u8fd4\u308a\u304c\u3042\u308b\r\n    print_r(json_decode($data, ture));\r\n?&gt;<\/pre>\n<p>\u3053\u3053\u3067\u6c17\u3092\u3064\u3051\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3068\u3053\u308d\u306f\u3001imageUrls\u306fjpg\u304bpng\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u3057\u304b\u3082\u3001\u62e1\u5f35\u5b50\u304cjpg\u304bpng\u3057\u304b\u3060\u3081\u3067\u3059\uff08\u6700\u5f8c\u304c.jpg\u307e\u305f\u306f.png\u306e\u307f\u53d7\u3051\u4ed8\u3051\u308b\uff09\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u5410\u304b\u308c\u305f\u3070\u3042\u3044\u306eID\u306a\u3069\u304c\u3064\u3044\u3066\u3044\u308b\u5834\u5408\u306fm\u7121\u52b9\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\uff13\uff0e\uff11\u306b\u52a0\u3048\u3001\u30b5\u30fc\u30d0\u30fc\u5185\u306e\u30ed\u30fc\u30ab\u30eb\u30a4\u30e1\u30fc\u30b8\u306e\u6295\u7a3f<\/h2>\n<p>Content-Type:multipart\/form-data<br \/>\n\u672c\u5bb6\u3067\u3053\u3093\u306a\u98a8\u306b\u3057\u306a\u3088\u3068\u304b\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1; highlight: []; html-script: false\">boundary\u6587\u5b57\u5217\r\nContent-Disposition: form-data; name=&quot;request&quot;\r\n{\r\n  &quot;contentUri&quot; : &quot;http:\/\/www.application.com\/id=12345&quot;,\r\n  &quot;title&quot; : &quot;\u30bf\u30a4\u30c8\u30eb&quot;,\r\n  &quot;body&quot; : &quot;\u672c\u6587&quot;,\r\n  &quot;urls&quot; : {\r\n    &quot;pcUrl&quot; : &quot;http:\/\/mixi.jp\/run_page_appli.pl?page_id=0&amp;module_id=0&amp;appParams=%7B%22uid%22%3A%221569%22%7D&quot;,\r\n    &quot;mobileUrl&quot; : &quot;&quot;,\r\n    &quot;smartphoneUrl&quot; : &quot;&quot;,\r\n  },\r\n  &quot;sourceId&quot; : &quot;3&quot;,\r\n}\r\nboundary\u6587\u5b57\u5217\r\nContent-Disposition: form-data; name=&quot;image1&quot;; filename=&quot;\u6dfb\u4ed8\u753b\u50cf1.jpg&quot;\r\nContent-Type: image\/jpeg\r\n.......\u6dfb\u4ed8\u753b\u50cf\u306e\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf<\/pre>\n<p>\u5b9f\u969b\u306b\u4e0a\u8a18\u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u306f\u3057\u307e\u305b\u3093\u3002<br \/>\n\u5b9f\u969b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058<\/p>\n<pre class=\"brush: php; gutter: true; first-line: 1; highlight: []; html-script: false\">&lt;?php\r\n    $page_id = &#039;123456&#039;;\r\n    $url = &#039;http:\/\/api.mixi-platform.com\/2\/pages\/&#039; . $page_id . &#039;\/feeds&#039;;\r\n\r\n    $title = &#039;\u30bf\u30a4\u30c8\u30eb&#039;;\r\n    $body = &#039;\u672c\u6587\u306e\u5185\u5bb9&#039;;\r\n    $image_file = &quot;\/tmp\/hoge.jpg&quot;;\r\n\r\n    $boundary = &quot;&quot;.md5(microtime());\r\n\r\n    $content = &quot;--&quot;.$boundary.&quot;\\r\\n&quot;;\r\n    $content.= &#039;Content-Disposition: form-data; name=&quot;request&quot;&#039;.&quot;\\r\\n&quot;;\r\n    $content.= &quot;\\r\\n&quot;;\r\n    $content.= json_encode(\r\n                array(\r\n                    &quot;title&quot; =&gt; $title,\r\n                    &quot;body&quot; =&gt; $body,\r\n               ));\r\n    $content.= &quot;\\r\\n&quot;;\r\n    $content.= &quot;--&quot;.$boundary.&quot;\\r\\n&quot;;\r\n    $content.= &#039;Content-Disposition: form-data; name=&quot;image1&quot;; filename=&quot;&#039; . basename($image_file) . &#039;&quot;&#039;.&quot;\\r\\n&quot;;\r\n    $content.= &#039;Content-Type: image\/jpeg&#039;.&quot;\\r\\n&quot;;\r\n    $content.= &quot;\\r\\n&quot;;\r\n    $content.= file_get_contents($image_file).&quot;\\r\\n&quot;;\r\n    $content.= &quot;--&quot;.$boundary.&quot;--&quot;;\r\n\r\n    $opt = array(\r\n        &#039;http&#039; =&gt; array(\r\n        &#039;method&#039; =&gt; &#039;POST&#039;,\r\n        &#039;header&#039; =&gt; &#039;Authorization: OAuth &#039;.$access_token.&quot;\\r\\n&quot;.\r\n                    &#039;Content-Type: multipart\/form-data; boundary=&#039;.$boundary;\r\n        &#039;ignore_errors&#039;=&gt;true,\r\n        &#039;content&#039; =&gt; $content,\r\n    ));\r\n    $htp[&#039;header&#039;] .= &quot;\\r\\n&quot;.&#039;Content-Type: application\/json&#039;;\r\n    $data = file_get_contents($url, false, stream_context_create($opt));\r\n?&gt;<\/pre>\n<p>\u3068\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u66f8\u3044\u3066\u884c\u304d\u307e\u3059\u3002<br \/>\n\u5b9f\u969b\u306f\u3082\u3046\u5c11\u3057urlencode\u3057\u305f\u308a\u3068\u304b\u3059\u308b\u3093\u3067\u3059\u3051\u3069\u306d\u30fb\u30fb\u30fb<\/p>\n<p>\u3042\u3068\u306f\u3001\u30d0\u30b0\u3063\u307d\u3044\u306e\u304c\u3001\u3042\u3063\u305f\u3051\u3069\u76f4\u3063\u305f\u307f\u305f\u3044\uff1f\uff1f<br \/>\nbody\u306b\u6539\u884c\u30b3\u30fc\u30c9\u304c\u3042\u308b\u3068\u6295\u7a3f\u3067\u304d\u306a\u3044\u3068\u304b\u30fb\u30fb\u30fb<\/p>\n<p>&nbsp;<br \/>\n<span style=\"color: #666699;\">\u203b\u4f59\u8ac7\u3060\u3051\u3069\u3001\u30b3\u30e1\u30f3\u30c8\u306e\u6295\u7a3f\u3067\u3082\u6539\u884c\u30b3\u30fc\u30c9\u3092\u53d7\u3051\u4ed8\u3051\u3066\u304f\u308c\u306a\u3044\u30fb\u30fb\u30fb<\/span><br \/>\n<span style=\"color: #666699;\"> \u4f55\u6545\u304b\\r\u306f\u306f\u3058\u304b\u308c\u306a\u3044\u3093\u3060\u3088\u306d\u30fb\u30fb\u30fb\u3067\u3082\u3001mixi\u30da\u30fc\u30b8\u306b\u306f\u3001\u6539\u884c\u306f\u53cd\u6620\u3055\u308c\u3066\u3044\u306a\u3044\u3093\u3060\u3088\u306d\u30fb\u30fb\u30fb\u3075\u3057\u304e\u3060\u306a\u3041\uff5e<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u304a\u4ed5\u4e8b\u95a2\u4fc2\u3067mixi\u30da\u30fc\u30b8\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u3053\u3068\u306b\u306a\u3063\u305f\u3088\uff1b\uff3f\uff1b \u3068\u308a\u3042\u3048\u305a\u3001\u500b\u4eba\u3067\u30d1\u30fc\u30c8\u30ca\u30fc\u767b\u9332\u30fb\u30fb\u30fb \u30af\u30ec\u30ab\u304c\u3044\u308b\u306e\u304borz \u3068\u304b\u601d\u3063\u305f\u308a\u3057\u306a\u304c\u3089\u767b\u9332\uff01 \u203b\u3042\u3068\u3001\u6cd5\u4eba\u306e\u5834\u5408\u306f\u767b\u8a18\u7c3f\u3092\u90f5\u9001\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u304b\u30fb\u30fb\u30fb \u3060\u304b\u3089\u6577 &hellip; <a href=\"https:\/\/devlog.nb3.jp\/wordpress\/42\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,3,9],"tags":[108,19,18],"class_list":["post-42","post","type-post","status-publish","format-standard","hentry","category-mixi","category-php","category-program","tag-mixi"],"_links":{"self":[{"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":0,"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devlog.nb3.jp\/wordpress\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}