通过WhatsApp API发送hyeprlink文本 - php [英] Sending hyeprlink text through WhatsApp API - php
问题描述
我尝试使用WhatsApp Api通过php脚本发送url,我使用了博客: http://blog.philippheckel.com/2013/07/07/send-whatsapp-messages-via-php-script-using-whatsapi/
我可以使用API调用将纯文本发送到任何数字。
for example script(in PHP)is:
$ w = new WhatsProt($ userPhone,$ userIdentity,$ userName,$ debug);
$ w-> Connect();
$ w-> LoginWithPassword($ password);
$ w-> sendMessage('919876543210',test message);
但是,如果我尝试发送url类型消息,如
$ w-> sendMessage('919876543210',http://www.google.com);
它以纯文本形式接收,而不是超链接。
我尝试了所有的选项,例如给文本添加html标签,但失败了。
在WhatsApp中,
超链接将作为文本接收,如果发件人号码尚未在接收者联系人列表中。然而,只要接收者将发件人添加为他们的联系人,超链接就会被点击。
I try to send url via php script with WhatsApp Api, I used the blog: http://blog.philippheckel.com/2013/07/07/send-whatsapp-messages-via-php-script-using-whatsapi/
I could send plain text to any number using the API call. for example script(in PHP) is:
$w = new WhatsProt($userPhone, $userIdentity, $userName, $debug);
$w->Connect();
$w->LoginWithPassword($password);
$w->sendMessage('919876543210', "test message");
But if I tried sending url type message like
$w->sendMessage('919876543210', "http://www.google.com");
It gets received as plain text, not hyperlink. I tried all options like giving html tags along with text but failed.
In WhatsApp, Hyperlinks will be received as text if the Sender Number is not already in contact list of receiver.
However, as soon as the receive adds the sender as their contact, the hyperlink will be clickable.
这篇关于通过WhatsApp API发送hyeprlink文本 - php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!