WhatsappAPI
WhatsappAPI copied to clipboard
help starting
Hi! I'm trying to understand how your API works. I think I'm doing something wrong.
IE trying to find a contact:
window.API.findContactId('12054524874');
api.js:265 Uncaught TypeError: x.__x_id.match is not a function
at Store.Contact.models.forEach.x (api.js:265)
at Array.forEach (
IE when running example from issue 39
chat = window.Store.Chat.add({id:window.Store.Chat.active()});
b = chat.createMessageFromText("/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=");
b.type = "location";
b.lat = 0;
b.lng = 0;
chat.addAndSendMsg(b);
VM241:2 Uncaught TypeError: chat.createMessageFromText is not a function
at
What I'm missing? And some questions: a) How to select a contact to send a message; b) how to send an embebed image?
Thanks a lot