flask 创建社交分享组件
flask Create social share components
我想创建一个 'share link' 我从 google 中找到了 https://pypi.org/project/Flask-Share/0.1.0/ 这个 link,它对我帮助很大,但我想删除一些未-需要 links 并添加一些新的 links 如 Whatsapp
from flask_share import Share
share = Share(app)
{{ share.create(title='Share with: ', content='WhatsApp') }}
{{ share.load() }}
{{ share.create(title='Share with: ') }}
TypeError: create() 得到了一个意外的关键字参数 'content'
根据 documentation,这不是 create
方法的使用方式。要指定要提供哪些应用程序,您必须使用 sites
kwarg。例如,sites="whatsapp"
.
文档引用:
sites – a string that consist of sites, separate by comma. supported site name: weibo, wechat, douban, facebook, twitter, google, linkedin, qq, qzone. for example: ‘weibo, wechat, qq’.
我不知道 WhatsApp 是否受支持,但如果支持,您的代码将如下所示:
from flask_share import Share
share = Share(app)
{{ share.create(title='Share with: ', sites='whatsapp') }}
{{ share.load() }}
{{ share.create(title='Share with: ') }}
看来这不可能。
看看 Flask Share GitHub page 上的 __init__.py
。见以下源码注释:
>:param sites: a string that consist of sites, separate by comma.
supported site name: weibo, wechat, douban, facebook, twitter,
google, linkedin, qq, qzone.
for example: `'weibo, wechat, qq'`.
如您所见,whatsapp
根本没有出现在此列表中。此外,a simple text search of the Flask Share source code indicates that the phrase "whatsapp" does not appear at all within the code. Finally, the screenshots of the demo(因为没有在线实际工作演示)表示不支持 whatsapp。
如果你想分享到WhatsApp,你需要一个支持它的应用程序包!
想要一个可靠的项目? 我在 GitHub 上维护着一个社交分享 URL 的项目,并且我们正在维护与 WhatsApp 的链接。只需下载代码并 运行 即可!检查我们! GitHub: Social Share URLs.
我想创建一个 'share link' 我从 google 中找到了 https://pypi.org/project/Flask-Share/0.1.0/ 这个 link,它对我帮助很大,但我想删除一些未-需要 links 并添加一些新的 links 如 Whatsapp
from flask_share import Share
share = Share(app)
{{ share.create(title='Share with: ', content='WhatsApp') }}
{{ share.load() }}
{{ share.create(title='Share with: ') }}
TypeError: create() 得到了一个意外的关键字参数 'content'
根据 documentation,这不是 create
方法的使用方式。要指定要提供哪些应用程序,您必须使用 sites
kwarg。例如,sites="whatsapp"
.
文档引用:
sites – a string that consist of sites, separate by comma. supported site name: weibo, wechat, douban, facebook, twitter, google, linkedin, qq, qzone. for example: ‘weibo, wechat, qq’.
我不知道 WhatsApp 是否受支持,但如果支持,您的代码将如下所示:
from flask_share import Share
share = Share(app)
{{ share.create(title='Share with: ', sites='whatsapp') }}
{{ share.load() }}
{{ share.create(title='Share with: ') }}
看来这不可能。
看看 Flask Share GitHub page 上的 __init__.py
。见以下源码注释:
>:param sites: a string that consist of sites, separate by comma.
supported site name: weibo, wechat, douban, facebook, twitter,
google, linkedin, qq, qzone.
for example: `'weibo, wechat, qq'`.
如您所见,whatsapp
根本没有出现在此列表中。此外,a simple text search of the Flask Share source code indicates that the phrase "whatsapp" does not appear at all within the code. Finally, the screenshots of the demo(因为没有在线实际工作演示)表示不支持 whatsapp。
如果你想分享到WhatsApp,你需要一个支持它的应用程序包!
想要一个可靠的项目? 我在 GitHub 上维护着一个社交分享 URL 的项目,并且我们正在维护与 WhatsApp 的链接。只需下载代码并 运行 即可!检查我们! GitHub: Social Share URLs.