dreamteammobile / botbuilder-viber Goto Github PK
View Code? Open in Web Editor NEWPlug-in Viber connector for Microsoft BotBuilder framework
Plug-in Viber connector for Microsoft BotBuilder framework
On Kik, hero card is supported like this.
So it is possible for this library to support hero card like this.
The question is, do you guys have this feature? Cuz you guys only mentioned this, which isn't really detailed:
It can probably send whole set of different messages Viber supports (Text, Url, Contact, Picture, Video, Location, Sticker, File)
Action: Send any message to the bot (The bot is supposed to reply to every message)
Result: No reply
2017-11-09T14:23:31.909639+00:00 app[web.1]: �[36m[2017-11-09 14:23:31.908] [DEBUG] �[39m�[36mValidating signature 'undefined' == '8e2424a0e9f276633233d569ac17b55efca8b8389f520d65eed4b6d16ae58978'�[39m
Might be Is actually a problem with viber-bot-node but they don't even have a issue section. I used restify for middleware though (Since botbuilder uses restify anyways).
Platform
Operating System: Ubuntu
Node Version: 9.3.0
NPM Version: 5.5.1
Code
https://github.com/DreamTeamMobile/botbuilder-viber
https://github.com/expressjs/express
https://github.com/expressjs/body-parser
var viber = require('botbuilder-viber');
var express = require('express');
var bodyParser = require('body-parser');
var viberOptions = {
Token: '***',
Name: '***',
AvatarUrl: '***'
}
var viberChannel = new viber.ViberEnabledConnector(viberOptions);
var expressApp = express();
expressApp.listen(process.env.port || process.env.PORT || 3978, function() {
console.log("Express server is running.");
});
expressApp.use(bodyParser.urlencoded({ extended: false }));
expressApp.use(bodyParser.json());
bot.connector(viber.ViberChannelId, viberChannel);
expressApp.use('/viber/webhook', viberChannel.listen());
Expected Behavior
No error
Actual Behavior
Error (repeats twice everytime) when I sending message from my viber bot.
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, TypedArray, or DataView
at Hmac.update (internal/crypto/hash.js:53:11)
at MessageValidator._calculateHmacFromMessage (/app/node_modules/viber-bot/lib/message/message-validator.js:17:54)
at MessageValidator.validateMessage (/app/node_modules/viber-bot/lib/message/message-validator.js:11:30)
at _app.use (/app/node_modules/viber-bot/lib/middleware.js:61:32)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at textParser (/app/node_modules/body-parser/lib/types/text.js:60:7)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at expressInit (/app/node_modules/express/lib/middleware/init.js:40:5)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at query (/app/node_modules/express/lib/middleware/query.js:45:5)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at Function.handle (/app/node_modules/express/lib/router/index.js:174:3)
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, TypedArray, or DataView
at Hmac.update (internal/crypto/hash.js:53:11)
at MessageValidator._calculateHmacFromMessage (/app/node_modules/viber-bot/lib/message/message-validator.js:17:54)
at MessageValidator.validateMessage (/app/node_modules/viber-bot/lib/message/message-validator.js:11:30)
at _app.use (/app/node_modules/viber-bot/lib/middleware.js:61:32)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at textParser (/app/node_modules/body-parser/lib/types/text.js:60:7)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at expressInit (/app/node_modules/express/lib/middleware/init.js:40:5)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at query (/app/node_modules/express/lib/middleware/query.js:45:5)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at Function.handle (/app/node_modules/express/lib/router/index.js:174:3)
If we are, then how is it possible?
@alexsorokoletov @alexeystrakh
There seems to be drastic differences in the botframework v4 with V3. As I understand on V3 the viberConnector was registered with this line of code
//after initialising your bot and existing connectors
bot.connector(viber.ViberChannelId, viberChannel)
How would you achieve the same on V4?. Maybe use the botframework-connector package?
Hi!
I was looking for some documentation/example on sending a customized keyboard via botbuilder-viber.
Hi,
We are using the same example as in instructions and using express app. When registering webhook, we are getting this error. Any help would be appreciated.
TypeError: Data must be a string or a buffer
at TypeError (native)
at Hmac.Hash.update (crypto.js:74:16)
at MessageValidator._calculateHmacFromMessage (....\node_modules\viber-bot\lib\message\message-validator.js:17:54)
Hi guys! If I correctly understand this info https://support.viber.com/customer/en/portal/articles/2836126-public-accounts-faq?b_id=3838 (last updated in Dec 2017) now creating public accounts is limited only to
large brands and companies, and high-profile accounts in countries where Viber operates its business solutions
Is that true? Any workarounds?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.