[wordpress插件] Bosima WeChat Page Sharing照顾微信页面分享

wordpress 插件 文章 2020-03-09 16:10 698 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

本插件通过集成微信提供的JS-SDK,从而实现自定义网页分享的内容,包括Url、标题、图片和内容。

This plug-in integrates the JS-SDK provided by WeChat, so as to achieve custom content sharing on web pages, including URLs, titles, pictures and content.

1、本插件简单灵活,分享的内容可全部从页面提取,也可在后台自定义。

1. This plug-in is simple and flexible, and all content shared can be extracted from the page or customized in the background.



2、目前已实现首页、分类页、文章页、标签页、搜索页、存档页以及单独页面的分享。

2. The homepage, category page, article page, tab page, search page, archive page, and individual page have been shared.



3、分享目标支持微信朋友、微信朋友圈、QQ、QQ空间。

3. Share goals Support WeChat friends, WeChat circle of friends, QQ, QQ space.



4、分享标题、图片、描述等内容首先从自定义模板提取,如果未设置模板则从页面提取,如果页面上提取不到则根据当前页面内容自动生成。

4. Contents such as sharing title, picture, description, etc. are first extracted from the custom template. If no template is set, they are extracted from the page. If they cannot be extracted on the page, they are automatically generated based on the current page content.



5、从页面提取时,各个分享内容的来源:标题来源于html->head->title,描述从html->head->meta[name='description']提取,图片取正文中的第一张

5. When extracting from the page, the source of each shared content: the title is derived from html-> head-> title, the description is extracted from html-> head-> meta [name = 'description'], and the picture is taken from the first page

图。

Illustration.



6、分享url目前只能是当前url,未提供自定义设置功能。

6. The sharing URL can only be the current URL, and no custom setting function is provided.

Dependency

Dependency

WeChat JS-SDK

WeChat JS-SDK

https:/es.wx.qq.com/open/js/jweixin-1.2.0.js

https:/es.wx.qq.com/open/js/jweixin-1.2.0.js

This plugin depends on the WeChat JS-SDK, which is a remote JS file and provided by WeChat.

This plugin depends on the WeChat JS-SDK, which is a remote JS file and provided by WeChat.

It provides initialization method of WeChat services, and provide some functions, including share to friends, share to circle of friends.

It provides initialization method of WeChat services, and provide some functions, including share to friends, share to circle of friends.

The JS-SDK is a service.

The JS-SDK is a service.

myip.fireflysoft.net

myip.fireflysoft.net

http://myip.fireflysoft.net

http://myip.fireflysoft.net

This plugin depends on the myip.fireflysoft.net, which can return the outbound IP of the user server.

This plugin depends on the myip.fireflysoft.net, which can return the outbound IP of the user server.

The exit IP needs to be added to the WeChat IP whitelist.

The exit IP needs to be added to the WeChat IP whitelist.

安装步骤

1、在您的Wordpress管理后台安装本插件或者通过上传文件夹到Wordpress插件目录的方式安装本插件;

1. Install the plugin in your Wordpress management background or install the plugin by uploading the folder to the Wordpress plugin directory;

2、启用插件;

2. Enable the plugin;

3、注册一个微信公众号,访问地址:https://mp.weixin.qq.com;

3. Register a WeChat public account and visit the address: https://mp.weixin.qq.com;

4、在“Wordpress管理后台”-“设置”-“微信分享设置”中获取服务器出口IP,填写到“微信公众平台”-“安全中心”-“IP白名单”中;

4. Obtain the server export IP in "Wordpress management background"-"Settings"-"WeChat sharing settings", and fill in "WeChat public platform"-"Security Center"-"IP whitelist";

5、在“微信公众平台”-“公众号设置”-“功能设置”-“JS接口安全域名”中填写您网站的域名;

5. Fill in the domain name of your website in "WeChat Public Platform"-"Public Account Settings"-"Feature Settings"-"JS Interface Security Domain Name";

6、在“Wordpress管理后台”-“设置”-“微信分享设置”中填写您微信公众号的AppID和AppSecrect(从“微信公众平台”-“基本配置”中获取)。

6. Fill in the AppID and AppSecrect of your WeChat public account in "Wordpress Management Background"-"Settings"-"WeChat Sharing Settings" (obtained from "WeChat Public Platform"-"Basic Configuration").

安装完毕。

The installation is complete.

特别说明:

Special instructions:

由于0.2.0版本将微信的配置参数保存到了插件目录下(当然也不会被外部访问到),导致控制台升级后配置会丢失。

The 0.2.0 version saved the configuration parameters of WeChat to the plugin directory (of course, it will not be accessed by external users), which caused the configuration to be lost after the console upgrade.



从0.2.1版本后配置参数保存位置进行了修改,防止升级导致丢失。

The configuration parameter save location has been modified since version 0.2.1 to prevent loss due to upgrade.



因此0.2.0版本升级后请重新设置微信的AppId和AppSecrect。

Therefore, after the 0.2.0 version upgrade, please reset WeChat AppId and AppSecrect.

下载地址
https://downloads.wordpress.org/plugin/bosima-wechat-page-sharing.0.3.4.zip
-EOF-

AI助手支持GPT4.0