Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have tried as below, It's navigating to the number and the cursor remains in the search box. Hence the message doesn't send to the number. If I select the chat box then the message is going.

What I have tried:

<pre> Try
            Dim web As New WebBrowser

           
            web.Navigate("whatsapp://send?phone=" & TextBox3.Text & "&text=" & TextBox2.Text.Replace(" ", "+") & "")
           
            Timer1.Start()
        Catch ex As Exception
            Timer1.Stop()
        End Try

    End Sub

  
    Dim sec As Integer = 0
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        sec += 1
        If sec = 5 Then
            SendKeys.Send("{ENTER}")
            Timer1.Stop()
            sec = 0
        End If
    End Sub
Posted
Updated 20-Dec-22 7:25am

1 solution

You probably need the API: https://developers.facebook.com/docs/whatsapp/[^] should get you started. They do have a free tier, but it has limited volume per month.
 
Share this answer
 
Comments
zakariyaptpl 20-Dec-22 8:40am    
Thank you. There is no way to do without API ?
OriginalGriff 20-Dec-22 9:23am    
Why would you want to do it in a hard, complicated, and unreliable (because sites change at a moments notice) way when a reliable and - manufacturer sanctioned - way is available?

Not planning on bulk spamming are you?
zakariyaptpl 20-Dec-22 9:43am    
No sir. I have a membership managing project and I want to send the number of the members whose membership has expired.

I have downloaded the API. Let me try that.
OriginalGriff 20-Dec-22 9:47am    
Then the free tier will probably be all you need - 1000 messages a month, I think.
zakariyaptpl 20-Dec-22 9:52am    
Yes, That would be enough. I think Docker for windows is not yet ready. Only the Beta version is available.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900