Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

除了ipad协议外,其他协议都不能发送小程序卡片和H5卡片是什么问题? #2668

Open
linxiulan opened this issue Apr 12, 2024 · 1 comment

Comments

@linxiulan
Copy link

如题

Copy link

dosubot bot commented Apr 12, 2024

The issue you're experiencing with sending mini-program cards and H5 cards, except through the iPad protocol, likely stems from the specific wechaty-puppet you're using and the WeChat API's limitations. Not all puppet implementations support all features, which can lead to discrepancies in functionality like the one you're encountering.

For sending mini-program and H5 cards, ensure your code aligns with the Wechaty SDK's capabilities. Here's a quick guide:

Mini-Program Card:

const miniProgramPayload = new MiniProgram ({
  username: 'gh_xxxxxxx', // from mp.weixin.qq.com
  appid: '', // optional, from mp.weixin.qq.com
  title: '', // optional
  pagepath: '', // optional
  description: '', // optional
  thumbnailurl: '', // optional
});
await msg.say(miniProgramPayload);

H5 Card:

const linkPayload = new UrlLink ({
  description: 'WeChat Bot SDK for Individual Account',
  thumbnailUrl: 'https://avatars0.githubusercontent.com/u/25162437?s=200&v=4',
  title: 'Welcome to Wechaty',
  url: 'https://github.com/wechaty/wechaty',
});
await msg.say(linkPayload);

If issues persist, providing more details about the puppet you're using and any error messages could help diagnose the problem further.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant