Share vk, facebook, twitter, google

<a href="http://vk.com/share.php?url={{ share_url }}" target="_blank">
</a>

<a href="http://www.facebook.com/sharer/sharer.php?u={{ share_url }}"
   target="_blank">
</a>

<a href="https://twitter.com/intent/tweet?&url={{ share_url }}"
   target="_blank">
</a>

<a href="https://plus.google.com/share?url={{ share_url }}"
   target="_blank">
</a>

django example:
in dict value:
domain: site.com
url:site.com/show_page?v={{ p.ver }}

{% with ''|add:domain|add:'/show_page?v='|add:p.ver as share_url %}
    {% include 'social_share.html' %}
{% endwith %}

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s