sanderdriesen / WhatsAPINet

A .NET WhatsApp API
32 stars 48 forks source link

not running Sending image via whatsapp api using c# #18

Closed abu-sraag closed 8 years ago

abu-sraag commented 8 years ago

hello i'm trying to send an image using c#

but the image not delivered and there is no exception message !!!

here's my code

byte[] img = File.ReadAllBytes("e:\img.gif"); wa.OnConnectSuccess += () => { MessageBox.Show("Connected to whatsapp...");

    wa.OnLoginSuccess += (phoneNumber, data) =>
    {
        wa.SendMessage(to, msg);

        wa.SendMessageImage(to,img,ApiBase.ImageType.GIF);
        MessageBox.Show("Message Sent...");
    };

}

abu-sraag commented 8 years ago

byte[] img = File.ReadAllBytes(@"e:\img.gif"); wa.OnConnectSuccess += () => { MessageBox.Show("Connected to whatsapp...");

wa.OnLoginSuccess += (phoneNumber, data) =>
{
    wa.SendMessage(to, msg);

    wa.SendMessageImage(to,img,ApiBase.ImageType.GIF);
    MessageBox.Show("Message Sent...");
};
sanderdriesen commented 8 years ago

How do you create the FMessageIdentifierKey represented by the 'to' variable?

abu-sraag commented 8 years ago

I did not understand me corrected the error

I did not understand your words where what is wrong (FMessageIdentifierKey )?

Is there a reference wiki

Note that it does not appear any error just are not sen

abu-sraag commented 8 years ago

i am edit wa.SendMessageImage(tbto.Text,img,ApiBase.ImageType.GIF);

not send what is wrong ?!

janpieterz commented 8 years ago

Hi @abu-sraag

There is no reference wiki. This is just an open source effort to allow people to play with the service, and nobody is investing a lot of time to make it that accessible for developers, precisely because it's just meant for playing so developers can find out this stuff for themselves. There should be some sample code in the projects that should help you slightly and besides that just understanding what is going on by reading the code. We don't provide any support or services so I'll close this issue. Sorry we can't be of more help to you.