WhatsappAPI icon indicating copy to clipboard operation
WhatsappAPI copied to clipboard

help starting

Open gushome7 opened this issue 6 years ago • 0 comments

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 () at Object.findContactId (api.js:264) at :1:12

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 :2:11

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

gushome7 avatar Nov 29 '18 12:11 gushome7