yowsup icon indicating copy to clipboard operation
yowsup copied to clipboard

How to upload an image to WhatsApp server using yowsup

Open atans opened this issue 13 years ago • 8 comments

How to upload an image to WhatsAppp server and get url of image https://mms504.whatsapp.net/d6/15/00/6/1/6169eeec03dc50f69456497508a9466c.jpg using yowsup?

WhatsApp will block account when used third-party image url. see https://github.com/venomous0x/WhatsAPI/issues/258

Thank you very much.

atans avatar Feb 08 '13 08:02 atans

I think you should read this: https://github.com/tgalal/yowsup/wiki/Yowsup-Library-Documentation

CODeRUS avatar Feb 08 '13 09:02 CODeRUS

I'm trying to make a function to send images using Yowsup, but to execute the method I get these errors

toString ignored call, probably Encountered byte toString ignored call, probably Encountered byte Unhandled exception in thread started by <bound method WhatsappSendImage.onAuthSuccess of <Examples.SendImage.WhatsappSendImage instance at 0x865ab8c>>

Someone could help me.

manufuentescr avatar Feb 08 '13 17:02 manufuentescr

There already is a function to send images, you should use that. See the library documentation CODeRUS posted.

ghost avatar Feb 08 '13 18:02 ghost

I know, I read the documentation, but when calling the method message_imageSend, I get these errors

manufuentescr avatar Feb 08 '13 18:02 manufuentescr

Errors usually come with line numbers and file names. You should have a look at those lines in those files and try to understand what goes wrong. My guess is that the parameters you are giving are of the wrong data type.

ghost avatar Feb 08 '13 18:02 ghost

parameters are:

jid = id of the message url = url of the image name = name of the image size = int (image size) preview = image icon (base64_encode)

Is this correct?

manufuentescr avatar Feb 08 '13 19:02 manufuentescr

@CODeRUS I just found out the send method, what's the upload image method. Any example for me. Thanks

atans avatar Feb 09 '13 02:02 atans

I need to know this too.

Wiku5 avatar Oct 02 '13 17:10 Wiku5