This article mainly describes: in the thinkphp framework, how to get the Sharing interface permissions, how to set up a secure domain name, how to modify the share title, modify share description, modify share pictures, how to customize share content
This article mainly describes: in the thinkphp framework, how to get the Sharing interface permissions, how to set up a secure domain name, how to modify the share title, modify share description, modify the sharing of images, how to customize the sharing content.
Here's a comparison of the effects of modifying the share title, sharing the description, sharing the image, and not modifying it:
No modified share: The URL path where the shared content is a shared page.
Change the effect of sharing content such as: share content for your own custom content.
1, the necessary conditions: Certified public number.
2, in the Public management background, click on the public number settings, enter the function settings, select the JS interface security domain name, download the TXT format certification file in the root directory of the site, and then return to the Public Admin page, determine the authentication, fill in the domain name of the site sharing, save.
3, download the JSSDK interface file package. Download Address: Link: http://pan.baidu.com/s/1eStCSXc Password: 1p8k
4. Configure the JSSDK interface package to the thinkphp extension directory, which is configured in the thinkphp/extend/vendor/directory.
5. Obtain the public number AppID and Appsecret from the public number, and configure it in the thinkphp configuration file.
6. Define the initialization function in the thinkphp common.php file: (The parameters in the case should be taken from the configuration file)
7, in the need to use the custom sharing content of the class file, define the sharing content, and then passed to the template page:
Where: is the custom title, brief is a custom share description content, picture is a custom share image path, is the custom share content is clicked to point to the link address.
8, then the introduction of JS files in the page and the use of configuration parameters: