Heroku Facebook'ta haberci chatbot uygulama hatası

oy
0

Ben haberci bir Facebook chatbot inşa etmek istedi. Tuitorial bağlantı chatbot dağıtımıyla ilgili çoğu öğreticiler MAC yani OSX üzerindedir. Benim OS tam önlem ve 'doğruluk' ile kullanılabilen diğer öğreticiler 30+ tekrarlamalar yoluyla çalıştı pencereler 7. olduğunu. Yine uygulama hatası çözülecek gibi görünmüyor. Heroku günlükleri i hatanın nedenini atıfta çalıştı. Bu ikisinden biri yardım etmedi.

index.js

'use strict'

const token = process.env.FB_PAGE_ACCESS_TOKEN
const vtoken = process.env.FB_VERIFY_ACCESS_TOKEN

const express = require('express')
const bodyParser = require('body-parser')
const request = require('request')
const app = express()

app.set('port', (process.env.PORT || 5000))

// Process application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({extended: false}))

// Process application/json
app.use(bodyParser.json())

// Index route
app.get('/', function (req, res) {
    res.send('Hello world, I am a chat bot') 
})

// for Facebook verification
app.get('/webhook/', function (req, res) {
    if (req.query['hub.verify_token'] === vtoken) {
         res.send(req.query['hub.challenge'])
    }
     res.send('No sir')
})

// Spin up the server
app.listen(app.get('port'), function() {
    console.log('running on port', app.get('port'))
})

Procfile

web : node index.js

Bu kod tamamen herhangi bir sentaks hatası olmadığı için iyi olacak gibi görünüyor. Uygulama Heroku bulut depolama için dağıtma ve git için sunucu tarafı node.js sahiptir. Heroku ve Git [chatfuel çok gibi şablonları kullanarak değil] olmadan messenger bu chatbots yaratmanın basit bir yolu var mı? bir SDK tüm dev ve dağıtmak için bot da iyi gelebilir. Ben böylece diğer çözümler önermek lütfen php (sevmiyorum) bilmiyorum.

Git-göbek bağlantısı: Tıklayın

Oluştur 25/07/2017 saat 18:49
kaynak kullanıcı
Diğer dillerde...                            


1 cevaplar

Heroku Facebook'ta haberci chatbot uygulama hatası

oy
0

Ben haberci bir Facebook chatbot inşa etmek istedi. Tuitorial bağlantı chatbot dağıtımıyla ilgili çoğu öğreticiler MAC yani OSX üzerindedir. Benim OS tam önlem ve 'doğruluk' ile kullanılabilen diğer öğreticiler 30+ tekrarlamalar yoluyla çalıştı pencereler 7. olduğunu. Yine uygulama hatası çözülecek gibi görünmüyor. Heroku günlükleri i hatanın nedenini atıfta çalıştı. Bu ikisinden biri yardım etmedi.

index.js

'use strict'

const token = process.env.FB_PAGE_ACCESS_TOKEN
const vtoken = process.env.FB_VERIFY_ACCESS_TOKEN

const express = require('express')
const bodyParser = require('body-parser')
const request = require('request')
const app = express()

app.set('port', (process.env.PORT || 5000))

// Process application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({extended: false}))

// Process application/json
app.use(bodyParser.json())

// Index route
app.get('/', function (req, res) {
    res.send('Hello world, I am a chat bot') 
})

// for Facebook verification
app.get('/webhook/', function (req, res) {
    if (req.query['hub.verify_token'] === vtoken) {
         res.send(req.query['hub.challenge'])
    }
     res.send('No sir')
})

// Spin up the server
app.listen(app.get('port'), function() {
    console.log('running on port', app.get('port'))
})

Procfile

web : node index.js

Bu kod tamamen herhangi bir sentaks hatası olmadığı için iyi olacak gibi görünüyor. Uygulama Heroku bulut depolama için dağıtma ve git için sunucu tarafı node.js sahiptir. Heroku ve Git [chatfuel çok gibi şablonları kullanarak değil] olmadan messenger bu chatbots yaratmanın basit bir yolu var mı? bir SDK tüm dev ve dağıtmak için bot da iyi gelebilir. Ben böylece diğer çözümler önermek lütfen php (sevmiyorum) bilmiyorum.

Git-göbek bağlantısı: Tıklayın

Cevap 25/07/2017 saat 18:49
kaynak kullanıcı

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more