Rhymen / go-whatsapp

WhatsApp Web API
MIT License
2.05k stars 490 forks source link

How to run this program?? #218

Open viral999g opened 4 years ago

viral999g commented 4 years ago

Hi Can anyone please provide me the running instructions for this project?

houstondapaz commented 4 years ago

the README did not helps you?

jeffry-luqman commented 4 years ago
  1. clone the repo
    git clone https://github.com/Rhymen/go-whatsapp
  2. go to some example dir
    cd go-whatsapp/examples/echo
  3. make vendored copy of dependencies
    go mod vendor
  4. run
    go run main.go
  5. scan the qr code from your whatsapp app
  6. according to the example file, try chatting "some text with contain @echo" from another whatsapp account
bamjohn2222 commented 4 years ago

I did what u mentioned @jeffryluqman . I get this error after running main.go from echo folder

.\main.go:37:9: assignment mismatch: 1 variable but wh.wac.Send returns 2 values

Also I am a completed newbie to golang, can you help me out ?

jeffry-luqman commented 4 years ago

bug on echo example, just change line 37 from

if err := wh.wac.Send(msg); err != nil {

to

if _, err := wh.wac.Send(msg); err != nil {