Wechat official account sharing how to transfer parameters?

problem description

how to pass parameters when sharing with Wechat official account?

the environmental background of the problems and what methods you have tried

Wechat official account sharing function needs to be realized. Once the user shares, user two opens the link shared by user one, and the information of user one can be obtained. How do I do this?

related codes

these parameters are given in the document, so what should I do if I want to bring parameters?

var shareData = {  //data
    title: "",
    desc: "",
    dataUrl: "",
    type: "link",
    imgUrl: "",
    link: ""
}

what result do you expect? What is the error message actually seen?

I have just contacted Wechat"s official account. Please give me some advice, dear gods.


in my past experience, we put the parameters after the shared url, when other users open the link, then the string intercepts these parameters, and then requests.

var shareData = {  //data
    title: '',
    desc: '',
    dataUrl: '',
    type: 'link',
    imgUrl: '',
    link: ''
}

this is the api, provided by Wechat to configure some information (title, description, target page link, type, thumbnail, etc.). If you don't configure it, all you share is a link, just a little uglier.
something like this:

clipboard.png

one is direct sharing, and the other is sharing with parameters configured. The result is all the same


dynamically set the parameters of the shared url

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c1df8f-158f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c1df8f-158f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?