Monday, November 3, 2014

Using Yowsup to send location

Previously when sending images, video and audio, the flow goes like this:

Request media upload -> request success -> upload -> upload success -> send url of uploaded media to other people

I realised that sending location does not follow this pattern. All it requires is calling message_locationSend with the correct parameters and it'll work.

Nevertheless, I had to fix up connectionmanager.py a bit as it does not include the "name" attribute, and it crashes my Whatsapp on iOS everytime the location is sent (as of 4 Nov 2014)...the updated connectionmanager.py is posted below. The line that is changed is marked with #sirpoot

If you send with a name, longitude and latitude you'll get this:





If you send with an empty name, you'll replicate the same thing as what Whatsapp on iOS does:






 Files:
Examples\LocationUploaderClient.py
Yowsup\connectionmanager.py
yowsup-cli





No comments:

Post a Comment