Home >Web Front-end >JS Tutorial >WeChat browser built-in JavaScript object WeixinJSBridge usage example_javascript skills
The WeChat public platform has begun to support front-end web pages. You may see that many web pages have buttons such as Share to Moments and Follow WeChat. Clicking on them will pop up a window for you to share and follow. How is this achieved? Today I will explain to you how to add share to Moments, follow WeChat ID and other buttons on the front-end web page of the WeChat public platform.
1. WeChat built-in browser
By remotely debugging WeChat’s own webpage on iPhone through Mac, we can find that WeChat’s embedded browser defines a private JavaScript object: WeixinJSBridge. By operating the relevant methods of this object, we can share it with WeChat Moments and judge a WeChat friend. The attention status of the signal and the realization of functions such as following the designated WeChat account.
2. js function: Share to Moments
3. js function: send to friends
4. js function: Share to Tencent Weibo
5. js function: follow the designated WeChat account