WeChat applet jumps to the video account

foreword

The video account has been out for a long time, and sometimes there is such a need among Party A: I want the applet to jump/open my own video account homepage, the applet to jump/open the live broadcast room of the video account, and the applet to open the video number video... this article explains how to implement these features

Open the homepage of the video number

Premise: If the subject of the applet and the video account are the same or related, you can jump to the homepage of the video account through wx.openChannelsUserProfile.
Subject judgment logic:

If the main body of the applet is the same as that of the video number, you can call the relevant interface. If the main body of the applet is different from that of the video account, the relevant interface can be called if the following three conditions are met at the same time:

  1. The Mini Program is bound to the WeChat Open Platform account
  2. The relationship between the mini program and the WeChat open platform account is the same subject or related subject
  3. The subject of the WeChat open platform account and the list of related subjects include the subject of the video number. The
    application process of the related subject can refer to: https://kf.qq.com/faq/190726e6JFja190726qMJBn6.html

Related APIs:

wx.openChannelsUserProfile(Object object)
Parameter Description
Attributes type required illustrate
finderUserName string yes video number id
success function no Callback function for successful interface call
fail function no Callback function for interface call failure
complete function no The callback function of the end of the interface call (the call will be executed successfully or failed)

Open the live broadcast of the video number

wx.openChannelsLive(Object object)
Parameter Description
Attributes type required illustrate
finderUserName string yes The video number id, the id starting with "sph", can be obtained in the video number assistant
feedId string no Live feedId, obtained through the getChannelsLiveInfo interface (required to be filled in versions prior to base library v2.19.2)
nonceId string no Live nonceId, obtained through the getChannelsLiveInfo interface (required to be filled in versions prior to the base library v2.19.2)
success function no Callback function for successful interface call
fail function no Callback function for interface call failure
complete function no The callback function of the end of the interface call (the call will be executed successfully or failed)

Other Notes: The prerequisites are the same as the prerequisites for opening the "Video Account Homepage"


Open the video number video

wx.openChannelsActivity(Object object)
Parameter Description
Attributes type required illustrate
finderUserName string yes The video number id, the id starting with "sph", can be obtained in the video number assistant
feedId string no video feedId
success function no Callback function for successful interface call
fail function no Callback function for interface call failure
complete function no The callback function of the end of the interface call (the call will be executed successfully or failed)

Related links and detailed links:

Official documentation: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/channels-profile.html
Official API: https://developers.weixin.qq.com/miniprogram/dev/ api/open-api/channels/wx.openChannelsUserProfile.html
Official video account background link: https://channels.weixin.qq.com/

Guess you like

Origin blog.csdn.net/z1783883121/article/details/127507320