Keywords: WeChat public platform template message
Author: Fangbei Studio
Original text: http ://www.cnblogs.com/txw1958/p/wechat-template-message.html
In this WeChat public platform development tutorial, we will introduce how to develop template messages, that is, how to use the program to send template messages.
This article is divided into the following three parts:
To apply for template messages, the account must have activated WeChat payment permissions.
In the backend of the WeChat public platform, enter "Function->Add Function Plug-in->Template Message" to apply for template messages.
Call SDK to send, the code is as follows
<span>1</span> <span>require_once</span>('weixin.class.php'<span>); </span><span>2</span> <span>$weixin</span> = <span>new</span><span> class_weixin(); </span><span>3</span> <span>var_dump</span>(<span>$weixin</span>->send_template_message(<span>urldecode</span>(json_encode(<span>$template</span>))));
The effect is as follows:
Please follow Fangbei Studio’s WeChat public account and reply “Download template”
==============================================
How to follow the Fangbei Studio WeChat public platform account:
1. WeChat address book-add friend-search public account-search for "Fangbei Studio"
2. WeChat address book-add friend-search Number - enter "pondbaystudio"
3. Use WeChat to scan the QR code below
$resultStr="
I will give you the one used in my code Let’s take an example. Replace the specific strings yourself
I hope you can adopt it! Thank you
These are fixed styles and do not support customization.