TeamFreeHugs / Whatsapp-Chatbot

Whatsapp Chatbot that gets past CSP!
20 stars 8 forks source link

how to use this bot #1

Open sanjayradadiya opened 8 years ago

sanjayradadiya commented 8 years ago

@eyeballcode how to use, i have no idea about your scenario can we have one example please

sanjayradadiya commented 8 years ago

@eyeballcode how to config this chatbot step by step please give me solution. .

eyeballcode commented 8 years ago

Have you run this code yet?

git clone https://github.com/TeamFreeHugs/Whatsapp-Chatbot.git
cd Whatsapp-Chatbot
npm install -d
node bin/www

It's part of the readme

sanjayradadiya commented 8 years ago

ok but i have one little confusion about this code like if some other user send me message then how i active that user message windows using clicks

eyeballcode commented 8 years ago

As of now you can't. It's something I want to do but the MutationObserver is detecting too much. You could try doing your own by observing the user list for a new message bubble.

sanjayradadiya commented 8 years ago

can you help me to develop this feature well

sanjayradadiya commented 8 years ago

hello i have create one little code for message bubbles for each user but when i trying to switch between current user service is not responded an user message and also when i trying message again then give reply so i am stop their

sanjayradadiya commented 8 years ago

if this problem solved then we can start using for all users but one thing is complicated

sanjayradadiya commented 8 years ago

i am little bit nearer to solution but some problem is arise for sending message to specific user.

sanjayradadiya commented 8 years ago

hi friends i have also faced this problem but solution is not found yet this occurred due to whatsapp cross domain restrictions

sanjayradadiya commented 8 years ago

but if we want to use http then it may be usefull ? bcz i hanv't secure connection so what i do?

sanjayradadiya commented 8 years ago

first of all we want to check that actually this feature is well run or not

andrecordeiro commented 8 years ago

hello @SR91 you could perform sending images ?

sanjayradadiya commented 8 years ago

no friend never yet but in feature is required

andrecordeiro commented 8 years ago

I tried to send an image this way: whatsapp.sendImage ( " https://www.mydomain.com/teste.jpg " ) and returned me a CORS error : Image from origin ' https://www.mydomain.com ' has Been blocked from loading by Cross-Origin Resource Sharing policy : In the ' Access -Control- Allow-Origin ' header is present on the requested resource . Origin ' https://web.whatsapp.com ' is Therefore not allowed access. @eyeballcode i can help me?

sanjayradadiya commented 8 years ago

yes i have also got this type of same error while send image using this procedure.

sanjayradadiya commented 8 years ago

@eyeballcode any updates regarding switch user we are waiting for your positive reply.

eyeballcode commented 8 years ago

Whoops. This is a CORS issue.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

It's also a CSP issue.

https://developer.mozilla.org/en-US/docs/Web/Security/CSP

There's nothing I can do about it, except that you could try the requestSomething method for cross origin stuff.

andrecordeiro commented 8 years ago

@@@Thank you friend. You could show an example of how to sendImage using requestSomething ?

ComedianCockleDoodleDoo commented 7 years ago

Your persistence is inspiring. And thank you for this discovery.

sanjayradadiya commented on Apr 7, 2016 hi friends i have also faced this problem but solution is not found yet this occurred due to whatsapp cross domain restrictions

eyeballcode commented 7 years ago

@ComedianCockleDoodleDoo @andrecordeiro @sanjayradadiya

Hello, I have re-written the API to work with Electron so the user does not have to bother with injection.

Also, this exposes all NodeJS APIs, allowing things like MongoDB to be access from the browser.

Please take a look here