Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure the interface in the development of php Wechat public platform

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the php Wechat public platform development how to configure the interface, the article is very detailed, has a certain reference value, interested friends must read it!

I. brief introduction

Wechat public platform is a new function module added by Tencent on the basis of Wechat. Through this platform, individuals and enterprises can create an official account of Wechat. And achieve all-round communication and interaction with the text, pictures and voice of specific groups.

II. Communication mechanism

Third, register the public account of Wechat platform

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

Server-side configuration

4.1 sample Code Settings

The Wechat public platform provides a sample code for php:

Http://xiazai.jb51.net/201612/yuanma/phpwxsample(jb51.net).rar

Download it, unzip it, and open it for editing.

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

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

4.2 Server platform Settings

If you have your own server and support php, you can upload the API 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) and Sina Cloud platform SAE (http://sae.sina.com.cn/).

4.2.1 Baidu BAE Settings

a. Register your 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 an application

Select "Mobile web App" as the access method.

d. Managed Settin

Select Cloud Environment (BAE)-> managed Settings.

Select "PHP" for the environment type.

e. Create a new version and upload the interface file

f. Go online and get the link

Obtained URL: http://zhuojin.duapp.com/

Note: zhuojinsz has been registered by me before, so I can't register again. The secondary domain name that should be obtained here should be the same as in the screenshot above.

BAE is set up.

4.2.2 Sina SAE Settings

a. Register your SAE account and log in

Http://sae.sina.com.cn/

b. Create a new application

My home page-> create a new application

c. Configure application

d. Upload code

Application Management-> Code Management-> upload Code package

e. Get the URL address

Obtained URL address: http://1.zhuojin.sinaapp.com/

SAE configuration is complete.

Configure the interface

Log in to Wechat Public platform-> High Energy function-> Development Mode

5.2 become a developer

5.3 Interface configuration Information

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

Token enter the custom token value, in this case zhuojinsz.

Fill in http://1.zhuojin.sinaapp.com/wxapi.php for SAE,URL

5.4 submit

Click "submit", and if everything is set up correctly, it will prompt "submit successfully".

5.5 View interface configuration information

BAE interface information

SAE interface information

5.6 Open development mode

The above is all the contents of the article "how to configure the Interface for the Development of php Wechat Public platform". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report