falcondai / wechat-nodejs-guide

a nodejs guide to integrating with the wechat (weixin) platform
5 stars 2 forks source link

Sending message back #2

Open sachanacar opened 8 years ago

sachanacar commented 8 years ago

Awesome guide! Thanks a lot!

I was wondering if you knew how we could send messages back to the account that is linked to the webhook. Basically, does WeChat support incoming webhooks?

falcondai commented 8 years ago

i am glad that you find it helpful 😄

do you mean a push mechanism, i.e. messaging users not as a reply to their messages?

sachanacar commented 8 years ago

Hey! I actually looked through the wechat-npm and found it :)

This does the trick:

res.reply('hello!')
falcondai commented 8 years ago

Yes, I should have covered that (but i have since moved onto other things). So WeChat uses standard HTTP request-reply to handle a user-initiated exchange. just out of curiosity, what are you working on?

sachanacar commented 8 years ago

I'm working on a chatbot built in Java that can strap itself onto different platforms (Slack, Spark, and Jabber, so far).

Here is the link to the project https://github.com/vmorsiani/jabbot Here is the link to the scripting language: https://github.com/tsearle/script

So I'm trying to link it to wechat!

falcondai commented 8 years ago

interesting. wechat is definitely a hot market but i found its public account feature not very productivity-friendly unlike Slack.