{"id":53357,"date":"2017-09-05T10:00:12","date_gmt":"2017-09-05T01:00:12","guid":{"rendered":"https:\/\/codeiq.jp\/magazine\/?p=53357"},"modified":"2018-10-11T18:11:24","modified_gmt":"2018-10-11T09:11:24","slug":"20170905_t21_iq","status":"publish","type":"post","link":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/","title":{"rendered":"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210"},"content":{"rendered":"<p>AWS\u3084Azure\u3092\u59cb\u3081\u305f\u3068\u3057\u305f\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u5168\u822c\u3092\u89e6\u3063\u3066\u3044\u304f\u9023\u8f09\u300c\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u7814\u7a76\u30b9\u30bf\u30b8\u30aa\u300d\u3002\u3053\u306e\u9023\u8f09\u3067\u306f\u3001IaaS,PaaS,BaaS,SaaS\u306a\u3069\u5e45\u5e83\u3044\u5f62\u614b\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u30ec\u30dd\u30fc\u30c8\u3057\u3066\u3044\u304d\u307e\u3059\uff01<\/p>\n<h2>\u4eca\u56de\u4f5c\u308b\u3082\u306e<\/h2>\n<p>\u3053\u3093\u306b\u3061\u306f\u3001\u30a8\u30f3\u30b8\u30cb\u30a2\u306e<a href=\"https:\/\/twitter.com\/tokutoku393\/\" target=\"_blank\">\u3061\u3083\u3093\u3068\u304f<\/a>\u3067\u3059\u3002\u30c6\u30af\u30cb\u30ab\u30eb\u30e9\u30a4\u30bf\u30fc\u3068\u3057\u3066<a href=\"https:\/\/dotstud.io\/\" target=\"_blank\">dotstudio<\/a>\u306b\u53c2\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u30012016\u5e74\u306b\u516c\u958b\u3055\u308c\u305f\u8a71\u984c\u306e<a href=\"https:\/\/developers.facebook.com\/docs\/messenger-platform?locale=ja_JP\" target=\"_blank\">Messenger Platform<\/a>\u3092\u4f7f\u3063\u3066Facebook Messenger Bot\u3092\u4f5c\u308aIBM Bluemix\u306b\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u304a\u5929\u6c17\u3092\u6559\u3048\u3066\u304f\u308c\u308b\u3082\u306e\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-01.jpg\" alt=\"\" width=\"640\" height=\"280\" class=\"alignnone size-full wp-image-68721\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-01.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-01-300x131.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Bot\u30d7\u30ed\u30b0\u30e9\u30e0\u306fNode.js\u3067\u4f5c\u6210\u3057\u3001IBM Bluemix\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308bWeather Company Data\u304b\u3089\u5929\u6c17\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066IBM Bluemix\u306b\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u3057\u904b\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u306e\u69cb\u6210\u3067\u624b\u9806\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>IBM Bluemix\u306e\u8a2d\u5b9a<\/li>\n<li>Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210<\/li>\n<li>\u5929\u6c17\u60c5\u5831\u3092\u53d6\u5f97<\/li>\n<li>Facebook Messenger Bot\u3092\u30c7\u30d7\u30ed\u30a4<\/li>\n<\/ul>\n<p>\u4eca\u56de\u306fBot\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30d9\u30fc\u30b9\u90e8\u5206\u4f5c\u6210\u3092\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-02.jpg\" alt=\"\" width=\"640\" height=\"345\" class=\"alignnone size-full wp-image-68722\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-02.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-02-300x162.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>IBM Bluemix\u306e\u8a2d\u5b9a\u3068\u30c7\u30d7\u30ed\u30a4\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u524d\u56de\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3><strong>\u7b46\u8005\u306e\u74b0\u5883<\/strong><\/h3>\n<p>OS X El Capitan\uff08v10.11.6\uff09<br \/>\nNode.js v8.2.1<\/p>\n<div id=\"custom_html-20\"  data-animation-event=\"enters\"  class=\"widget_text widget widget-container widget_custom_html\"><div class=\"textwidget custom-html-widget\"><div class=\"tk_jobsearch\">\n<div class=\"tk_jobsearch_button\">\n<p class=\"single-button-lead\">8,568\u901a\u308a\u3001\u3042\u306a\u305f\u306f\u3069\u306e\u30bf\u30a4\u30d7\uff1f<\/p>\n<p class=\"single-button-link\"><a href=\"https:\/\/next.rikunabi.com\/journal\/goodpoint-shindan\/?cminr=rnnj-goodpoint-secondbutton\" rel=\"noopener noreferrer\">\u30b0\u30c3\u30c9\u30dd\u30a4\u30f3\u30c8\u8a3a\u65ad<\/a><\/p>\n<\/div>\n<\/div>\n<\/div><\/div><h2>Facebook Messenger Bot\u3068\u306f<\/h2>\n<p>\u300cBot\u300d\u3068\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5236\u5fa1\u306b\u3088\u308b\u81ea\u52d5\u767a\u8a00\u30b7\u30b9\u30c6\u30e0\u306e\u3053\u3068\u3067\u3059\u3002\u9023\u8f09\u7b2c1\u56de\u3067\u306fLINE\u30a2\u30d7\u30ea\u4e0a\u3067\u52d5\u304f\u300cLINE Bot\u300d\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/developers.facebook.com\/docs\/messenger-platform\" target=\"_blank\">Messenger Platform<\/a>\u3068\u3044\u3046Messenger\u30a2\u30d7\u30ea\u958b\u767a\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u4f7f\u3044\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-03.jpg\" alt=\"\" width=\"640\" height=\"431\" class=\"alignnone size-full wp-image-68723\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-03.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-03-300x202.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Receive\/Send API\u3092\u4f7f\u3063\u3066\u3084\u308a\u53d6\u308a\u3059\u308b\u5f62\u5f0f\u3067\u3001LINE Bot\u958b\u767a\u306e\u7d4c\u9a13\u304c\u3042\u308b\u65b9\u306f\u30b9\u30e0\u30fc\u30ba\u306b\u5c0e\u5165\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u8a73\u7d30\u306fAPI\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div id=\"custom_html-21\"  data-animation-event=\"enters\"  class=\"widget_text widget widget-container widget_custom_html\"><div class=\"textwidget custom-html-widget\"><div class=\"tk_jobsearch\">\n<div class=\"tk_jobsearch_button\">\n<p class=\"single-button-lead\">8,568\u901a\u308a\u3001\u3042\u306a\u305f\u306f\u3069\u306e\u30bf\u30a4\u30d7\uff1f<\/p>\n<p class=\"single-button-link\"><a href=\"https:\/\/next.rikunabi.com\/journal\/goodpoint-shindan\/?cminr=rnnj-goodpoint-thirdbutton\" rel=\"noopener noreferrer\">\u30b0\u30c3\u30c9\u30dd\u30a4\u30f3\u30c8\u8a3a\u65ad<\/a><\/p>\n<\/div>\n<\/div>\n<\/div><\/div><h2>Facebook\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>\u307e\u305a\u306f\u958b\u767a\u3092\u59cb\u3081\u308b\u305f\u3081\u306bFacebook\u306e\u958b\u767a\u8005\u767b\u9332\u3092\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"https:\/\/developers.facebook.com\/\" target=\"_blank\">Facebook for Developers<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-04.jpg\" alt=\"\" width=\"640\" height=\"475\" class=\"alignnone size-full wp-image-68724\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-04.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-04-300x223.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30b9\u30bf\u30fc\u30c8\u304b\u3089\u30a2\u30ab\u30a6\u30f3\u30c8\u3068\u30a2\u30d7\u30ea\u306e\u4f5c\u6210\u3092\u9032\u3081\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-05.jpg\" alt=\"\" width=\"640\" height=\"389\" class=\"alignnone size-full wp-image-68725\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-05.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-05-300x182.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30a2\u30d7\u30ea\u540d\u306f\u5f8c\u304b\u3089\u5909\u66f4\u3067\u304d\u308b\u306e\u3067\u308f\u304b\u308a\u3084\u3059\u3044\u540d\u524d\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-06.jpg\" alt=\"\" width=\"640\" height=\"375\" class=\"alignnone size-full wp-image-68726\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-06.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-06-300x176.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u4f5c\u6210\u3067\u304d\u308b\u3068\u3001\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002\u5de6\u306e\u300c\u88fd\u54c1\u3092\u8ffd\u52a0\u300d\u30bf\u30d6\u304b\u3089\u300cMessenger\u300d\u3092\u9078\u629e\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-07.jpg\" alt=\"\" width=\"640\" height=\"479\" class=\"alignnone size-full wp-image-68727\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-07.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-07-300x225.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Messenger\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u79fb\u52d5\u3057\u3001\u5404\u7a2e\u8a2d\u5b9a\u304c\u884c\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-08.jpg\" alt=\"\" width=\"640\" height=\"386\" class=\"alignnone size-full wp-image-68728\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-08.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-08-300x181.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2>Facebook\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>Facebook Messenger Bot\u306fFacebook\u30da\u30fc\u30b8\u3068\u9023\u643a\u3057\u307e\u3059\u3002\u65e2\u5b58\u306e\u7ba1\u7406\u30da\u30fc\u30b8\u304b\u3001\u65b0\u898f\u306b\u4f5c\u6210\u3057\u305f\u30da\u30fc\u30b8\u3092\u5229\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4eca\u56de\u306f\u79c1\u304c\u904b\u55b6\u3057\u3066\u3044\u308b<a href=\"https:\/\/www.facebook.com\/nodegirls.jp\/\" target=\"_blank\">Node\u5973\u5b66\u5712\u306e\u30da\u30fc\u30b8<\/a>\u3092\u9023\u643a\u3055\u305b\u3066\u307f\u307e\u3059\uff08\u73fe\u5728Bot\u306f\u7a3c\u50cd\u3057\u3066\u3044\u307e\u305b\u3093\uff09\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-09.jpg\" alt=\"\" width=\"640\" height=\"373\" class=\"alignnone size-full wp-image-68729\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-09.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-09-300x175.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30da\u30fc\u30b8\u304c\u975e\u516c\u958b\u72b6\u614b\u306e\u5834\u5408\u9023\u643a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>Node.js\u3067Webhook\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>Messenger\u306e\u958b\u767a\u306b\u306f\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002Node.js\u3067\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3066\u3001\u305d\u306e\u4e0b\u306b<code>package.json<\/code>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<code>&lt;your app name&gt;<\/code>\u306f\u4efb\u610f\u306e\u30a2\u30d7\u30ea\u540d\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code>$ mkdir &lt;your app name&gt;\r\n$ cd &lt;your app name&gt;\/\r\n$ npm init --yes\r\n<\/code><\/pre>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u4e0b\u8a18\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3068\u3068\u3082\u306b<code>package.json<\/code>\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code>{\r\n  \"name\": \"&lt;your app name&gt;\",\r\n  \"version\": \"1.0.0\",\r\n  \"description\": \"\",\r\n  \"main\": \"index.js\",\r\n  \"scripts\": {\r\n    \"test\": \"echo \\\"Error: no test specified\\\" &amp;&amp; exit 1\"\r\n  },\r\n  \"keywords\": [],\r\n  \"author\": \"\",\r\n  \"license\": \"ISC\"\r\n}\r\n<\/code><\/pre>\n<p>\u4eca\u56de\u4f7f\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u3092<code>npm<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066<code>package.json<\/code>\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p><code>$ npm install express request body-parser --save<\/code><\/p>\n<p>\u6b21\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30e1\u30a4\u30f3\u3068\u306a\u308b<code>app.js<\/code>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><code>$ touch app.js<\/code><\/p>\n<p>\u30a8\u30c7\u30a3\u30bf\u3067<code>app.js<\/code>\u3092\u958b\u304d\u4ee5\u4e0b\u3092\u30b3\u30d4\u30fc\uff06\u30da\u30fc\u30b9\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p><code>$ touch app.js<\/code><\/p>\n<p>\u30a8\u30c7\u30a3\u30bf\u3067<code>app.js<\/code>\u3092\u958b\u304d\u4ee5\u4e0b\u3092\u30b3\u30d4\u30fc\uff06\u30da\u30fc\u30b9\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre><code>app.js\r\n'use strict'\r\n\r\nconst express = require('express');\r\nconst bodyParser = require('body-parser');\r\nconst request = require('request');\r\nconst app = express();\r\nconst token = '&lt;\u4efb\u610f\u306e\u6587\u5b57\u5217&gt;';\r\n\r\napp.set('port', (process.env.PORT || 3000));\r\n\r\napp.use(bodyParser.urlencoded({extended: false}));\r\napp.use(bodyParser.json());\r\n\r\napp.get('\/', function (req, res) {\r\n    res.send('Hello, Facebook Messenger Bot.')\r\n});\r\n\r\napp.get('\/webhook', function (req, res) {\r\n    if (req.query['hub.verify_token'] === token) {\r\n        res.send(req.query['hub.challenge'])\r\n    }\r\n    res.send('Error, wrong token')\r\n  console.log(req.query['hub.challenge']);\r\n});\r\n\r\napp.listen(app.get('port'), function() {\r\n    console.log('running on port', app.get('port'))\r\n});\r\n<\/code><\/pre>\n<p><code>&lt;\u4efb\u610f\u306e\u6587\u5b57\u5217&gt;<\/code>\u306e\u90e8\u5206\u306b\u306f\u3054\u81ea\u8eab\u3067token\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u306e\u3061\u307b\u3069Facebook\u5074\u306e\u8a2d\u5b9a\u3067\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2>ngrok\u3067\u8a66\u3059<\/h2>\n<p>\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u524d\u306b\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u304b\u3089webhook\u3092\u8a66\u3057\u3066\u307f\u307e\u3059\u3002PC\u306elocalhost\u306b\u30b0\u30ed\u30fc\u30d0\u30eb\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30c8\u30f3\u30cd\u30ea\u30f3\u30b0\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4eca\u56de\u306fngrok\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-10.jpg\" alt=\"\" width=\"640\" height=\"400\" class=\"alignnone size-full wp-image-68730\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-10.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-10-300x188.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><a href=\"https:\/\/ngrok.com\/\" target=\"_blank\">ngrock<\/a>\u306e\u30b5\u30a4\u30c8\u306b\u3044\u304d\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u89e3\u51cd\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-11.jpg\" alt=\"\" width=\"640\" height=\"370\" class=\"alignnone size-full wp-image-68731\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-11.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-11-300x173.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30d5\u30a9\u30eb\u30c0\u3067\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-12.jpg\" alt=\"\" width=\"640\" height=\"243\" class=\"alignnone size-full wp-image-68732\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-12.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-12-300x114.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u6b21\u306bngrok\u306e\u30e6\u30fc\u30b6\u767b\u9332\u3092\u3057\u307e\u3059\u3002\u5148\u307b\u3069\u306e\u30da\u30fc\u30b8\u304b\u3089\u767b\u9332\u3057\u3001\u767b\u9332\u5f8c\u306b\u8868\u793a\u3055\u308c\u308b\u30b3\u30de\u30f3\u30c9\u3092\u81ea\u8eab\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><code>$ .\/ngrok authtoken xxxxxxxxxxxxxxxxxxx<\/code><\/p>\n<p>\u30e6\u30fc\u30b6\u3068PC\u304c\u7d10\u3065\u3051\u3089\u308c\u3001\u4ee5\u5f8c\u30c8\u30f3\u30cd\u30ea\u30f3\u30b0\u304c\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><code>.\/ngrok http<\/code> &lt;\u30dd\u30fc\u30c8\u756a\u53f7>\u3067\u30c8\u30f3\u30cd\u30ea\u30f3\u30b0\u30b5\u30fc\u30d0\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002\u4eca\u56de\u30dd\u30fc\u30c8\u306f3000\u3092\u6307\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code>$ .\/ngrok http 3000<\/code><\/p>\n<p>\u8d77\u52d5\u3059\u308b\u3068\u5229\u7528\u3067\u304d\u308b\u30a2\u30c9\u30ec\u30b9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-13.jpg\" alt=\"\" width=\"640\" height=\"234\" class=\"alignnone size-full wp-image-68733\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-13.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-13-300x110.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>SSL\u5bfe\u5fdc\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304c\u5fc5\u8981\u306a\u306e\u3067\u3001<code>https:\/\/<\/code>\u306e\u65b9\u306e\u30a2\u30c9\u30ec\u30b9\u3092\u5229\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>ngrok\u306f\u8d77\u52d5\u306e\u305f\u3073\u306b\u30a2\u30c9\u30ec\u30b9\u304c\u5909\u308f\u308b\u306e\u3067\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306bngrok\u3092\u8d77\u52d5\u3057\u305f\u307e\u307e\u5225\u306e\u30bf\u30d6\u3067Node.js\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-14.jpg\" alt=\"\" width=\"640\" height=\"236\" class=\"alignnone size-full wp-image-68734\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-14.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-14-300x111.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u5148\u307b\u3069\u53d6\u5f97\u3057\u305f\u30ed\u30fc\u30ab\u30eb\u30c8\u30f3\u30cd\u30eb\u30b5\u30fc\u30d0\u306e\u30a2\u30c9\u30ec\u30b9\u3092Facebook\u30a2\u30d7\u30ea\u306ewebhook\u306b\u767b\u9332\u3057\u307e\u3059\u3002\u300cWebhook\u306e\u8a2d\u5b9a\u300d\u3092\u9078\u629e\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-15.jpg\" alt=\"\" width=\"640\" height=\"310\" class=\"alignnone size-full wp-image-68735\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-15.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-15-300x145.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30b3\u30fc\u30eb\u30d0\u30c3\u30afURL\u306b<code>\u30ed\u30fc\u30ab\u30eb\u30c8\u30f3\u30cd\u30eb\u30b5\u30fc\u30d0\u306e\u30a2\u30c9\u30ec\u30b9\/webhook<\/code>\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002\u30c8\u30fc\u30af\u30f3\u306b\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u3067\u8a18\u8f09\u3057\u305f\u4efb\u610f\u306e\u30c8\u30fc\u30af\u30f3\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u306f\u5168\u3066\u9078\u629e\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-16.jpg\" alt=\"\" width=\"640\" height=\"442\" class=\"alignnone size-full wp-image-68736\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-16.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-16-300x207.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u300c\u78ba\u8a8d\u3057\u3066\u4fdd\u5b58\u300d\u3092\u62bc\u3059\u3068\u3001\u30a2\u30c9\u30ec\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u6b63\u5e38\u306b\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u8fd4\u3059\u3068\u767b\u9332\u3055\u308c\u307e\u3059\u3002ngrok\u306e\u5b9f\u884c\u753b\u9762\u3067\u30a2\u30af\u30bb\u30b9\u304c\u6765\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-17.jpg\" alt=\"\" width=\"640\" height=\"346\" class=\"alignnone size-full wp-image-68737\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-17.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-17-300x162.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2>Facebook\u30da\u30fc\u30b8\u3092\u9023\u643a\u3059\u308b<\/h2>\n<p>Facebook\u30da\u30fc\u30b8\u3092\u8a2d\u5b9a\u3057\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3092\u767a\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-18.jpg\" alt=\"\" width=\"640\" height=\"264\" class=\"alignnone size-full wp-image-68738\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-18.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-18-300x124.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u767a\u884c\u3055\u308c\u305f\u30c8\u30fc\u30af\u30f3\u3092\u30b3\u30d4\u30fc\u3057\u3001<code>curl<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u53e9\u3044\u3066Bot\u3092\u8d77\u52d5\u3055\u305b\u307e\u3059\u3002<\/p>\n<p><code>curl -ik -X POST \"https:\/\/graph.facebook.com\/v2.6\/me\/subscribed_apps?access_token=&lt;\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3&gt;\"<\/code><\/p>\n<p>\u6b63\u3057\u304f\u8a2d\u5b9a\u3067\u304d\u308b\u3068Facebook\u30da\u30fc\u30b8\u306e\u66f4\u65b0\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-19.jpg\" alt=\"\" width=\"640\" height=\"69\" class=\"alignnone size-full wp-image-68739\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-19.jpg 640w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-19-300x32.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2>\u30aa\u30a6\u30e0\u8fd4\u3057Bot\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>Bot\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30d9\u30fc\u30b9\u3068\u3057\u3066\u3001\u30aa\u30a6\u30e0\u8fd4\u3057Bot\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code>`app.js`\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\r\n\r\napp.tjs\r\n'use strict'\r\n\r\nconst express = require('express');\r\nconst bodyParser = require('body-parser');\r\nconst request = require('request');\r\nconst app = express();\r\nconst token = '';\r\n\r\n\r\nconst sendTextMessage = (sender, text) =&gt; {\r\n  const messageData = {\r\n    text:text\r\n  }\r\n  request({\r\n    url: 'https:\/\/graph.facebook.com\/v2.6\/me\/messages',\r\n    qs: {access_token:token},\r\n    method: 'POST',\r\n    json: {\r\n      recipient: {id:sender},\r\n      message: messageData,\r\n    }\r\n  }, (error, response, body) =&gt; {\r\n    if (error) {\r\n      console.log('Error: ', error);\r\n    } else if (response.body.error) {\r\n      console.log('Error: ', response.body.error);\r\n    }\r\n  });\r\n}\r\n\r\napp.set('port', (process.env.PORT || 3000));\r\n\r\napp.use(bodyParser.urlencoded({extended: false}));\r\napp.use(bodyParser.json());\r\n\r\napp.get('\/', function (req, res) {\r\n    res.send('Hello, Facebook Messenger Bot.');\r\n});\r\n\r\napp.get('\/webhook', function (req, res) {\r\n    if (req.query['hub.verify_token'] === token) {\r\n    res.send(req.query['hub.challenge']);\r\n    }\r\n  res.send('Error, wrong validation token');\r\n});\r\n\r\napp.post('\/webhook', function (req, res) {\r\n  let messaging_events = req.body.entry[0].messaging\r\n  for (let i = 0; i &lt; messaging_events.length; i++) {\r\n    let event = req.body.entry[0].messaging[i]\r\n    let sender = event.sender.id\r\n    if (event.message &amp;&amp; event.message.text) {\r\n      let text = event.message.text\r\n      sendTextMessage(sender, text.substring(0, 200));\r\n    }\r\n  }\r\n  res.sendStatus(200);\r\n});\r\n\r\napp.listen(app.get('port'), function() {\r\n    console.log('running on port', app.get('port'));\r\n});\r\n<\/code><\/pre>\n<p>\u5192\u982d\u306e<code>&lt;\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3&gt;<\/code>\u306b\u306f\u3001\u5148\u307b\u3069\u53d6\u5f97\u3057\u305f\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<h2>\u8a66\u3057\u3066\u307f\u308b<\/h2>\n<p>\u5909\u66f4\u3057\u305f\u3089\u518d\u5ea6<code>npm start<\/code>\u3067Node.js\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u3001Facebook Messenger\u4e0a\u3067\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-20.jpg\" alt=\"\" width=\"537\" height=\"640\" class=\"alignnone size-full wp-image-68740\" srcset=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-20.jpg 537w, https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/dotstudio-20-252x300.jpg 252w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/p>\n<p>\u30aa\u30a6\u30e0\u8fd4\u3057\u304c\u3067\u304d\u307e\u3057\u305f\uff01<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306fBot\u306e\u30d9\u30fc\u30b9\u306b\u306a\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u958b\u767a\u6bb5\u968e\u3067\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL\u304c\u5fc5\u8981\u306b\u306a\u308b\u3053\u3068\u304c\u30cd\u30c3\u30af\u3067\u3057\u305f\u304c\u3001localhost\u306b\u30b0\u30ed\u30fc\u30d0\u30eb\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30c8\u30f3\u30cd\u30ea\u30f3\u30b0\u30c4\u30fc\u30eb\u3092\u4f7f\u3046\u3053\u3068\u3067\u7c21\u5358\u306b\u691c\u8a3c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u307e\u305fSSL\u5bfe\u5fdc\u3082\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u306d\u3002<\/p>\n<p>\u6b21\u56de\u306fIBM Bluemix\u306eWeather Company Data\u3092\u4f7f\u3063\u3066\u5929\u6c17\u60c5\u5831\u306e\u53d6\u5f97\u3092\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u307e\u305f\uff01<\/p>\n<div class=\"block_content_1px\">\n<h4>\u53d6\u6750\u30fb\u57f7\u7b46\uff1adotstudio, inc. \u3061\u3083\u3093\u3068\u304f<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-31595\" src=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2018\/05\/tokuno.jpg\" alt=\"\" width=\"80\" height=\"80\" \/><span style=\"font-size: 14px;\">\u5927\u5b66\u307e\u3067\u306f\u6587\u7cfb\u3067\u6cd5\u5b66\u3092\u5b66\u3093\u3067\u3044\u305f\u304c\u300c\u30e2\u30ce\u3092\u4f5c\u308c\u308b\u4eba\u300d\u306b\u61a7\u308c\u3066\u77e5\u8b58\u30bc\u30ed\u304b\u3089Web\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u9053\u3078\u3002\u8ee2\u8077\u3057\u73fe\u5728\u306fIoT\u4e2d\u5fc3\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u30fb\u30c6\u30af\u30cb\u30ab\u30eb\u30e9\u30a4\u30bf\u30fc\u3068\u3057\u3066\u6d3b\u52d5\u3002Node.js\u30e6\u30fc\u30b6\u30b0\u30eb\u30fc\u30d7\u5185\u306e\u5973\u6027\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u300cNode Girls\u300d\u3092\u4e3b\u50ac\u3002Twitter: @<a href=\"https:\/\/qiita.com\/tokutoku393\" target=\"_blank\" rel=\"noopener\">tokutoku393<\/a> \/ dotstudio, inc.<\/span><\/p>\n<\/div>\n<p><strong><span style=\"font-size: 12px;\">\u203b\u672c\u8a18\u4e8b\u306f\u300cCodeIQ MAGAZINE\u300d\u63b2\u8f09\u306e\u8a18\u4e8b\u3092\u8ee2\u8f09\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/span><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWS\u3084Azure\u3092\u59cb\u3081\u305f\u3068\u3057\u305f\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u5168\u822c\u3092\u89e6\u3063\u3066\u3044\u304f\u9023\u8f09\u300c\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u7814\u7a76\u30b9\u30bf\u30b8\u30aa\u300d\u3002\u3053\u306e\u9023\u8f09\u3067\u306f\u3001IaaS,PaaS,BaaS,SaaS\u306a\u3069\u5e45\u5e83\u3044\u5f62\u614b\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u969b\u306b\u4f7f\u3063\u3066&#8230;<\/p>\n","protected":false},"author":21,"featured_media":68720,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[6],"tags":[294,639],"class_list":["post-53357","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-topic","tag-node-js","tag-bluemix"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210 - \u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210 - \u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb\" \/>\n<meta property=\"og:description\" content=\"AWS\u3084Azure\u3092\u59cb\u3081\u305f\u3068\u3057\u305f\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u5168\u822c\u3092\u89e6\u3063\u3066\u3044\u304f\u9023\u8f09\u300c\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u7814\u7a76\u30b9\u30bf\u30b8\u30aa\u300d\u3002\u3053\u306e\u9023\u8f09\u3067\u306f\u3001IaaS,PaaS,BaaS,SaaS\u306a\u3069\u5e45\u5e83\u3044\u5f62\u614b\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u969b\u306b\u4f7f\u3063\u3066...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/\" \/>\n<meta property=\"og:site_name\" content=\"\u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/rikunabinext\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-05T01:00:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-11T09:11:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"pinq4387\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rikunabinext\" \/>\n<meta name=\"twitter:site\" content=\"@rikunabinext\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"pinq4387\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/\"},\"author\":{\"name\":\"pinq4387\",\"@id\":\"https:\/\/next.rikunabi.com\/journal\/#\/schema\/person\/4a722a08300f7e203753fa5126966ded\"},\"headline\":\"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\",\"datePublished\":\"2017-09-05T01:00:12+00:00\",\"dateModified\":\"2018-10-11T09:11:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/\"},\"wordCount\":141,\"image\":{\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg\",\"keywords\":[\"Node.js\",\"Bluemix\"],\"articleSection\":[\"\u6c17\u306b\u306a\u308b\u8a71\u984c\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/\",\"url\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/\",\"name\":\"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210 - \u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb\",\"isPartOf\":{\"@id\":\"https:\/\/next.rikunabi.com\/journal\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg\",\"datePublished\":\"2017-09-05T01:00:12+00:00\",\"dateModified\":\"2018-10-11T09:11:24+00:00\",\"author\":{\"@id\":\"https:\/\/next.rikunabi.com\/journal\/#\/schema\/person\/4a722a08300f7e203753fa5126966ded\"},\"breadcrumb\":{\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#primaryimage\",\"url\":\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg\",\"contentUrl\":\"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg\",\"width\":300,\"height\":300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\/\/next.rikunabi.com\/journal\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/next.rikunabi.com\/journal\/#website\",\"url\":\"https:\/\/next.rikunabi.com\/journal\/\",\"name\":\"\u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb\",\"description\":\"\u30ad\u30e3\u30ea\u30a2\u30fb\u30d3\u30b8\u30cd\u30b9\u306e\u60c5\u5831\u3067\u3042\u306a\u305f\u306e\u300c\u50cd\u304f\u300d\u3092\u5fdc\u63f4\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/next.rikunabi.com\/journal\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/next.rikunabi.com\/journal\/#\/schema\/person\/4a722a08300f7e203753fa5126966ded\",\"name\":\"pinq4387\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c6b0ad28e3cab6941b44f5274523e5b4a048401d15b548117fb3ba95544819b8?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c6b0ad28e3cab6941b44f5274523e5b4a048401d15b548117fb3ba95544819b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c6b0ad28e3cab6941b44f5274523e5b4a048401d15b548117fb3ba95544819b8?s=96&d=mm&r=g\",\"caption\":\"pinq4387\"},\"url\":\"https:\/\/next.rikunabi.com\/journal\/author\/pinq4387\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210 - \u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/","og_locale":"ja_JP","og_type":"article","og_title":"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210 - \u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb","og_description":"AWS\u3084Azure\u3092\u59cb\u3081\u305f\u3068\u3057\u305f\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u5168\u822c\u3092\u89e6\u3063\u3066\u3044\u304f\u9023\u8f09\u300c\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u7814\u7a76\u30b9\u30bf\u30b8\u30aa\u300d\u3002\u3053\u306e\u9023\u8f09\u3067\u306f\u3001IaaS,PaaS,BaaS,SaaS\u306a\u3069\u5e45\u5e83\u3044\u5f62\u614b\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u969b\u306b\u4f7f\u3063\u3066...","og_url":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/","og_site_name":"\u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb","article_publisher":"https:\/\/www.facebook.com\/rikunabinext\/","article_published_time":"2017-09-05T01:00:12+00:00","article_modified_time":"2018-10-11T09:11:24+00:00","og_image":[{"width":300,"height":300,"url":"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg","type":"image\/jpeg"}],"author":"pinq4387","twitter_card":"summary_large_image","twitter_creator":"@rikunabinext","twitter_site":"@rikunabinext","twitter_misc":{"\u57f7\u7b46\u8005":"pinq4387","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"3\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#article","isPartOf":{"@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/"},"author":{"name":"pinq4387","@id":"https:\/\/next.rikunabi.com\/journal\/#\/schema\/person\/4a722a08300f7e203753fa5126966ded"},"headline":"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210","datePublished":"2017-09-05T01:00:12+00:00","dateModified":"2018-10-11T09:11:24+00:00","mainEntityOfPage":{"@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/"},"wordCount":141,"image":{"@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#primaryimage"},"thumbnailUrl":"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg","keywords":["Node.js","Bluemix"],"articleSection":["\u6c17\u306b\u306a\u308b\u8a71\u984c"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/","url":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/","name":"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210 - \u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb","isPartOf":{"@id":"https:\/\/next.rikunabi.com\/journal\/#website"},"primaryImageOfPage":{"@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#primaryimage"},"image":{"@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#primaryimage"},"thumbnailUrl":"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg","datePublished":"2017-09-05T01:00:12+00:00","dateModified":"2018-10-11T09:11:24+00:00","author":{"@id":"https:\/\/next.rikunabi.com\/journal\/#\/schema\/person\/4a722a08300f7e203753fa5126966ded"},"breadcrumb":{"@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#primaryimage","url":"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg","contentUrl":"https:\/\/next.rikunabi.com\/journal\/wp-content\/uploads\/2017\/09\/main-1.jpg","width":300,"height":300},{"@type":"BreadcrumbList","@id":"https:\/\/next.rikunabi.com\/journal\/20170905_t21_iq\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/next.rikunabi.com\/journal\/"},{"@type":"ListItem","position":2,"name":"IBM Bluemix\u3068Node.js\u3067\u304a\u5929\u6c17\u901a\u77e5\uff01\u2015Facebook Messenger Bot(2) \/ Bot\u306e\u30d9\u30fc\u30b9\u3092\u4f5c\u6210"}]},{"@type":"WebSite","@id":"https:\/\/next.rikunabi.com\/journal\/#website","url":"https:\/\/next.rikunabi.com\/journal\/","name":"\u30ea\u30af\u30ca\u30d3NEXT\u30b8\u30e3\u30fc\u30ca\u30eb","description":"\u30ad\u30e3\u30ea\u30a2\u30fb\u30d3\u30b8\u30cd\u30b9\u306e\u60c5\u5831\u3067\u3042\u306a\u305f\u306e\u300c\u50cd\u304f\u300d\u3092\u5fdc\u63f4","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/next.rikunabi.com\/journal\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/next.rikunabi.com\/journal\/#\/schema\/person\/4a722a08300f7e203753fa5126966ded","name":"pinq4387","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/c6b0ad28e3cab6941b44f5274523e5b4a048401d15b548117fb3ba95544819b8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c6b0ad28e3cab6941b44f5274523e5b4a048401d15b548117fb3ba95544819b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c6b0ad28e3cab6941b44f5274523e5b4a048401d15b548117fb3ba95544819b8?s=96&d=mm&r=g","caption":"pinq4387"},"url":"https:\/\/next.rikunabi.com\/journal\/author\/pinq4387\/"}]}},"publishpress_future_action":{"enabled":false,"date":"2026-04-24 00:46:03","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category","extraData":[]},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/posts\/53357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/comments?post=53357"}],"version-history":[{"count":2,"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/posts\/53357\/revisions"}],"predecessor-version":[{"id":68741,"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/posts\/53357\/revisions\/68741"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/media\/68720"}],"wp:attachment":[{"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/media?parent=53357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/categories?post=53357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/next.rikunabi.com\/journal\/wp-json\/wp\/v2\/tags?post=53357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}