search
HomeWeChat AppletWeChat DevelopmentWeChat public platform message interface development for online song request/online music

1. Obtain music resources

Baidu has a music interface,

http://box.zhangmen.baidu.com/x?op =12&count=1&title=About winter$$Qiqin$$$$

The returned result is

This XML file does not appear to have any style information associated with it. The document tree is shown below.<result><count>1</count><url><encode></encode><decode></decode><type>8</type><lrcid>14706</lrcid><flag>1</flag></url><durl><encode></encode><decode></decode><type>8</type><lrcid>14706</lrcid><flag>1</flag></durl><p2p><hash>d1cae9f7634c5aa3d54d7b1b1ad4c5b79b6e97ff</hash><url></url><type>mp3</type><size>5710896</size><bitrate>192</bitrate></p2p></result>

2. Connecting with WeChat

The music message format is as follows

WeChat public platform message interface development for online song request/online music

Parameter Description

ToUserName  接收方帐号(收到的OpenID)
FromUserName  开发者微信号
CreateTime  消息创建时间
MsgType  music
MusicUrl  音乐链接
HQMusicUrl  高质量音乐链接,WIFI环境优先使用该链接播放音乐
FuncFlag  位0x0001被标志时,星标刚收到的消息。

3. Core program implementation

WeChat public platform message interface development for online song request/online music

4. Effect Demonstration
You need to add the WeChat public account Fangbei Studio, you can see the relevant instructions

<span style="color: #000000;">1. 发送“点歌”加歌名,如“点歌最炫民族风”,返回指定的歌曲。<br></span>

The song plays smoothly in the WIFI environment and has a good experience.

This is the interface for successfully requesting songs

WeChat public platform message interface development for online song request/online music

This is the display at the top sidebar

WeChat public platform message interface development for online song request/online music

This is the music playback interface

WeChat public platform message interface development for online song request/online music

More WeChat public platform news For articles related to interface development and online song request/online music, please pay attention to 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.