JS The SDK (Open to Developers in WeChat Web Development Kit) is the latest interface capability released by the public platform for the Official Account message template.
Via WeChat JS-SDK Provided 11 Class interface set, developers can not only use WeChat's own basic capabilities such as taking photos, selecting pictures, voice, location, etc., but also directly use WeChat's unique capabilities such as sharing, sweeping, coupons, and payment to provide WeChat users with a better web experience.
Below are the general Official Account message template of JS SDK Use steps, and third-party platforms in place of Official Account message template use JS SDK Of the steps.
ordinary Official Account message template of JS SDK The steps are as follows (View Details):
1, binding domain name
Introduction JS file
Adoption config Interface to inject a permission validation configuration, where you need to pass the Official Account message template of access_Token To get jsapi_ticket(jsapi_ticket yes Official Account message template For calling WeChat JS The temporary ticket for the interface) and then get the signature Conduct JS SDK Configuration of the
Adoption ready Interface Processing Successful Validation
Adoption error Interface Processing Failure Validation
Third-party platform developers instead Official Account message template use JS SDK The steps are as follows:
(1) The web development domain name filled in when applying for a third-party platform will be used as its authorization Official Account message template of JS SDK Secure Domain Name (See "Required Reading Before Accessing" - "Application Information Note" for details)
(2) Normal introduction in the web pages of third-party platforms JS file
Adoption config Interface to inject the permissions validation configuration, but after getting the jsapi_ticket When not passed. Official Account message template of access_Token To obtain, but through the authorization of a third-party platform Official Account message template Token (After the Official Account message template is authorized to the third-party platform, the third-party platform passes the api_authorizer_Token The interface gets Token), to get the jsapi_Ticket, and then use this jsapi_ticket To get Signature, proceed JS SDK Of configuration and development. Be careful JS SDK Other information is normal in other configurations of Official Account message template Information (not from third parties).
Adoption ready Interface Processing Successful Validation
Adoption error Interface Processing Failure Validation