[英]Social media link in Django
我想在 Django 模板中的帖子末尾設置一個社交鏈接。 如何使用 Django 帖子中的社交媒體鏈接在社交中分享我的帖子?
查看 django-social-share ( https://github.com/fcurella/django-social-share ) 或 django-socialsharing ( https://github.com/lettertwo/django-socialsharing )。
更多可以在這里找到: https : //www.djangopackages.com/grids/g/social/
我發現了一些東西。 對於谷歌、LinkedIn、Facebook:
<a href="https://plus.google.com/share?url=http://your-domain{{ request.get_full_path|urlencode }}"></a>
<a href="http://www.linkedin.com/shareArticle?url=http://your-domain{{ request.get_full_path|urlencode }}&title=<your title>&summary=<your desc>&source=http://your-domain"></a>
<a href="http://www.facebook.com/sharer/sharer.php?u=http://your-domain{{ request.get_full_path|urlencode }}"></a>
此外,這個插件 (django-social-share)非常好。 您可以通過以下方式安裝它:
pip install django-social-share
要使用此插件,請參閱文檔頁面
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.