After I upgraded from 1.6.1 to 1.7.0 I am not able to run api.listenMqtt() again for the same api instance. I use login() to create an api instance and then I export this instance and use it in my code to listen for Facebook messages based on specific requests I receive (I have a http.createServer listening for requests and I use these requests to send messages to FB with api.sendMessage()).
After each response from my server, I run stopListening() as I don't wait for any more messages from Facebook. Everything works fine for the first request but when I get a second request api.listenMqtt() is not working.
I think that these variables should be resetted after stopListening
var identity = function () {};
var mqttClient = undefined;
Any idea of how can I access these variables through the api instance? Thank you in advance
try to modify listenMqtt in your node_modules
Thank you. I tried it but it didn't help :/
I have the same issue with listenMqtt :(
Any idea how this could be resolved?
Thanks in advance
This is a major issue for me too. Please advice.
@7osCraft can we add the mqttClient variable to the API context instead of making it a global variable? sorry I missed this during review
Sure. I'll look into it and do some tests. Thanks for notifying me.
I'll try to make a fix soon.
@7osCraft thank you for looking into it!
Do we have any updates on this?
Hello,
Sorry for the delay, I'll try to get a PR today.
Most helpful comment
Sure. I'll look into it and do some tests. Thanks for notifying me.
I'll try to make a fix soon.