Home > WeChat Applet > WeChat Development > WeChat public platform development One-click follow WeChat public platform account

WeChat public platform development One-click follow WeChat public platform account

高洛峰
Release: 2017-03-08 16:07:40
Original
2194 people have browsed it

1. Use HTTP protocol

【Expired】

<a>点击关注方倍工作室</a>。
Copy after login

2. Use weixin protocol

Method 1:【Expired Invalid]

<a>点击关注方倍工作室</a>
Copy after login
Copy after login
Copy after login

Method 2: [Invalid]

<a>点击关注方倍工作室</a>
Copy after login
Copy after login
Copy after login

Method 3: [valid on Android, invalid on Apple]

<a>点击关注方倍工作室</a>
Copy after login
Copy after login
Copy after login

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);
        });
};
Copy after login

4. Exclusively for some accounts

【Expired】

https://open.weixin.qq.com/subscribe?appid=wxb629c48b653e
Copy after login

5. DNS only

【Effective for Gao Shuaifu】

WeChat public platform development One-click follow WeChat public platform account

Decoding followed by

https://login.weixin.qq.com/l/E0LsxoTaRxC_HM
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template