这是自定义的 Twitter 图标代码:
HTML:
HTML:
<i id="twitter_share" class="fa fa-twitter fs20" style="position: relative; bottom: 4px;"></i>
还有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');
});
这个url和标题都可以正常显示,但问题是,如何同时分享一张图片呢?
非常感谢您的帮助。
更新:在Facebook中的参考 在Facebook中,我可以像这样分享内容,Twitter上也可以吗?谢谢!