Twitter share

1 reply·opened Apr 11, 2016
J
josephgendronApr 11, 2016

Hello,

Great template!

I'd like to create a single page with a few share buttons (facebook, twitter, etc.) And I wish that the buttons look like this:
<a href="#" class="social-icon si-dark si-large si-facebook"><i class="icon-facebook"></i><i class="icon-facebook"></i></a>

How can I do this? Twitter gives me something like: <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://….com/….html" data-text="…" data-via="…">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
Am I supposed to integrate this code somewhere?

:)

Joseph

S
SemiColonWebSTAFFApr 11, 2016

Hello,

Please use the following HTML Code:

<a href="https://twitter.com/share" class="twitter popup social-icon si-dark si-twitter" data-url="http://….com/….html" data-text="…" data-via="…"><i class="icon-twitter"></i><i class="icon-twitter"></i></a>

Now, add the following JS Code at the bottom of the Page just after the js/functions.js Linking:

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');$(".popup").click(function(t){var i=575,w=400,h=($(window).width()-i)/2,e=($(window).height()-w)/2,n=this.href,o="status=1,width="+i+",height="+w+",top="+e+",left="+h;return window.open(n,"twitter",o),!1});</script>

This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard