1) Draft creation - 草稿创建 First, we will create a draft in the draft box, so that later we can publish and share it with users. so following details we are using to create this message. and also I have attached the Dev doc and API url for draft publish. 首先,我们将在草稿箱中创建草稿,以便稍后我们可以发布并与用户共享。因此,我们将使用以下详细信息来创建此消息。并且我还附上了草稿发布的开发文档和 API url. https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Add_draft.html https://api.weixin.qq.com/cgi-bin/draft/add?access_token=ACCESS_TOKE 2) Publish - 发布 Once the draft is created, it will return a [代码]temp_id[代码]. Using this [代码]temp_id[代码], we can publish the draft. 草稿创建完成后会返回一个temp_id,利用这个temp_id我们就可以发布草稿了。 https://developers.weixin.qq.com/doc/offiaccount/Publish/Publish.html https://api.weixin.qq.com/cgi-bin/freepublish/submit?access_token=ACCESS_TOKEN 3) Send it to users - 发送给用户 With the [代码]temp_id[代码] from the message and the user's [代码]open_id[代码] (which we already have), we can send this published draft to any user. User will see a summary of the message. If they want to see the full message, they need to click on it to view it. However, when the user clicks on it, it should redirect to the HTML content we set in stage 1 (which was uploaded to WeChat). Instead, it currently redirects to a 'Temporary link unavailable' page. 利用消息中的 temp_id 和用户的 open_id(我们已经有了),我们可以将这个已发布的草稿发送给任何用户。用户将看到消息摘要。如果他们想查看完整消息,他们需要点击它来查看。但是,当用户点击它时,它应该重定向到我们在第 1 阶段设置的 HTML 内容(已上传到微信)。相反,它当前重定向到“临时链接不可用”页面。https://developers.weixin.qq.com/doc/offiaccount/en/Message_Management/Service_Center_messages.html#7 https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN [图片]
WeChat Message Redirects to 'Temporary Link ExpireOnce the message is received from the WeChat app, if the user clicks on it, they get redirected to the "Temporary Link Expired" page. To send messages, we are using the following API HTTP request method: POST https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN { "touser":"OPENID", "msgtype":"mpnews", "mpnews": { "media_id":"MEDIA_ID" } } The message is sent without any issues, but after the user receives it, clicking on the message redirects them to the "Temporary Link Expired" page. Wechat doc "https://developers.weixin.qq.com/doc/offiaccount/en/Message_Management/Service_Center_messages.html#7" 从微信应用程序收到消息后,如果用户点击该消息,他们会被重定向到“临时链接已过期”页面。要发送消息,我们使用以下 API HTTP request method: POST https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN { "touser":"OPENID", "msgtype":"mpnews", "mpnews": { "media_id":"MEDIA_ID" } } 消息发送没有任何问题,但用户收到消息后,点击该消息会将其重定向到“临时链接已过期”页面。 微信文档 "https://developers.weixin.qq.com/doc/offiaccount/en/Message_Management/Service_Center_messages.html#7" [图片]
08-20