Home > Backend Development > PHP Tutorial > WeChat public platform development (1) Configuration interface_PHP tutorial

WeChat public platform development (1) Configuration interface_PHP tutorial

WBOY
Release: 2016-07-20 11:14:16
Original
1130 people have browsed it

WeChat public platform is a new functional module added by Tencent based on WeChat. Through this platform, individuals and enterprises can create a WeChat public platform. number, and achieve all-round communication and interaction with specific groups through text, pictures, and voice.

Registration address: https://mp.weixin.qq.com

4.1 Sample code settings

WeChat public platform provides a php sample code:

http://mp.weixin.qq.com/mpres/htmledition/res/wx_sample.zip

Download, unzip, and open for editing.

Set the token value to the value you need. The token can be filled in by the developer to generate a signature.

After editing, save and close the file, change the file wx_sample.php to a custom name, here to wxapi.php, and package it again into wxapi.zip.

4.2 Server Platform Settings

If you have your own server and supports PHP, you can upload the interface file to the server. If you do not have your own server, you can choose some free cloud platforms for development, such as Baidu Application Engine BAE (http://developer. baidu.com/bae), Sina cloud platform SAE (http://sae.sina.com.cn/).

4.2.1 Baidu BAE settings

a. Register a BAE account and log in

https://passport.baidu.com/v2/?reg®Type=1&tpl=mn&u=http%3A%2F%2Fwww.baidu.com%2F

b. Join the Developer Center

c. Create application

Select “mobile web application” as the access method.

d. Hosting Settings

Select Cloud Environment (BAE) -> Hosting Settings.

Select “PHP” as the environment type.

e. Create a new version and upload the interface file

f. Go online and get the link

The obtained URL is: http://zhuojin.duapp.com/

Note: zhuojinsz has been registered by me before, so it cannot be registered again. The second-level domain name that should be obtained here should be the same as written in the screenshot above.

BAE setup completed.

4.2.2 Sina SAE settings

a. Register an SAE account and log in

http://sae.sina.com.cn/

b. Create new application

My Home Page -> Create New App

c. Configure application

d. Upload code

Application Management -> Code Management -> Upload Code Package

e. Get URL address

The URL address obtained is: http://1.zhuojin.sinaapp.com/

SAE configuration completed.

5.1 Log in to WeChat public platform -> High-power functions -> Development mode

5.2 Become a developer

5.3 Interface configuration information

For URL, fill in the BAE URL obtained above: http://zhuojin.duapp.com/, plus the name of the uploaded php file. That is http://zhuojin.duapp.com/wxapi.php

Token fill in the custom token value, here is zhuojinsz.

For SAE, fill in the URL http://1.zhuojin.sinaapp.com/wxapi.php

5.4 Submit

Click "Submit". If everything is set correctly, it will prompt "Submission successful".

5.5 View interface configuration information

BAE interface information

SAE interface information

5.6 Turn on development mode

At this point, the configuration is complete.

Please follow Zhuojin Suzhou WeChat public account, Zhuojin Suzhou is developed based on the SAE platform and is developed for mainstream WeChat functions. test.

You can follow the Zhuojin Suzhou public account to conduct functional testing and obtain new application development.

1. Log in to the WeChat client, friends -> Add friends -> Search number -> zhuojinsz, find and follow.

2. Scan the QR code:

Zhuojin Suzhou Little Yellow Chicken Test.

WeChat public platform development (1) Configuration interface_PHP tutorial

We Believe, Great People Share Knowledge...

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440315.htmlTechArticleWeChat public platform is a new functional module added by Tencent on the basis of WeChat. Through this platform, individuals and Enterprises can create a WeChat public account and connect with specific groups...
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