135
rated 0 times
[
140]
[
5]
/ answers: 1 / hits: 18286
/ 9 Years ago, mon, july 6, 2015, 12:00:00
Here is the custom twitter icon code:
HTML:
<i id=twitter_share class=fa fa-twitter fs20 style=position: relative; bottom: 4px;></i>
And Jquery:
$('#twitter_share').click(function (e) {
e.preventDefault();
var loc = <?= base_url(uri_string()); ?>;
var title = <?= $video->title; ?>;
window.open('http://twitter.com/share?url=' + loc + '&text=' + title + '&', 'twitterwindow', 'height=450, width=550, top=' + ($(window).height() / 2 - 225) + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');
});
It works fine with the url and title. The problem is , how can I share one image as well?
Thanks a lot for helping.
Update: reference in facebook
in facebook I can share the content like this, can it be done in twitter as well? Thanks.
!
More From » jquery