Sending hyeprlink text through WhatsApp API - php

北战南征 提交于 2019-12-12 21:16:37

问题


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.


回答1:


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.




回答2:


my friend, dont do that .

I think you Will be banned .

If not, already got .



来源:https://stackoverflow.com/questions/26365363/sending-hyeprlink-text-through-whatsapp-api-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!