我想在Django模板中的帖子末尾设置一个社交链接。如何使用Django的帖子中的社交媒体链接在社交中分享我的帖子?
发布于 2014-01-31 21:13:34
查看django-social-share (https://github.com/fcurella/django-social-share)或django-social-share (https://github.com/lettertwo/django-socialsharing)。
更多信息可以在这里找到:https://www.djangopackages.com/grids/g/social/
发布于 2016-05-26 19:09:43
我发现了一些东西。对于Google,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>另外,这个plugin (django-social-share)非常好用。您可以通过以下方式安装它:
pip install django-social-share有关使用此插件的信息,请参阅Doc's page
https://stackoverflow.com/questions/21479779
复制相似问题