Home > Article > WeChat Applet > WeChat public platform development One-click follow WeChat public platform account
1. Use HTTP protocol
【Expired】
<a>点击关注方倍工作室</a>。
2. Use weixin protocol
Method 1:【Expired Invalid]
<a>点击关注方倍工作室</a>
Method 2: [Invalid]
<a>点击关注方倍工作室</a>
Method 3: [valid on Android, invalid on Apple]
<a>点击关注方倍工作室</a>
3. Use JavaScript code
【Only valid for official domain names】
var addWxContact = function(wxid, cb) { if (typeof WeixinJSBridge == 'undefined') return false; WeixinJSBridge.invoke('addContact', { webtype: '1', username: 'gh_204936aea56d' }, function(d) { // 返回d.err_msg取值,d还有一个属性是err_desc // add_contact:cancel 用户取消 // add_contact:fail 关注失败 // add_contact:ok 关注成功 // add_contact:added 已经关注 WeixinJSBridge.log(d.err_msg); cb && cb(d.err_msg); }); };
4. Exclusively for some accounts
【Expired】
https://open.weixin.qq.com/subscribe?appid=wxb629c48b653e
5. DNS only
【Effective for Gao Shuaifu】
Decoding followed by
https://login.weixin.qq.com/l/E0LsxoTaRxC_HM
The above is the detailed content of WeChat public platform development One-click follow WeChat public platform account. For more information, please follow other related articles on the PHP Chinese website!