Home>Article>Backend Development> Detailed explanation of how to create WeChat custom menu with PHP

Detailed explanation of how to create WeChat custom menu with PHP

墨辰丷
墨辰丷 Original
2018-05-19 13:48:58 1246browse

This article mainly introduces the method of creating a WeChat custom menu in PHP, and analyzes the principles, steps and specific implementation techniques of creating a WeChat custom menu in PHP in the form of examples. Friends who need it can refer to it

The example in this article describes the method of creating a WeChat custom menu in PHP. Share it with everyone for your reference, the details are as follows:

Before using the common interface, you need to do the followingtwo-step work:

1. Have a WeChat public account, And obtainappidandappsecret(apply for internal testing qualification on the public platform and obtain it after passing the review)

2. Obtainthrough the certificate acquisition interface access_token

Note:

access_token is a ticket for third parties to access api resources;

access_token corresponds to the public account and is a globally unique ticket , repeated acquisition will cause the last access_token to become invalid.

Visit the following address (note to replace your appid and secret):

https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid =APPID&secret=APPSECRET

Then you can see the return information in the browser:

{"access_token":"这里就是你的access_token","expires_in":7200}

Create a custom menu :


      

Related recommendations:

PHP creationWeChat custom menuMethod

phpWeChat custom menuDetailed explanation of interface, customer service interface, and QR code usage code

PHP implementation creationWeChat custom menuInstance

The above is the detailed content of Detailed explanation of how to create WeChat custom menu with PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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