将文本附加到 Twitter 共享链接 [英] Attaching text to the twitter sharing link

查看:39
本文介绍了将文本附加到 Twitter 共享链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试弄清楚如何在此 twitter 共享功能的开头输出文本字符串 Try this recipe.所以当你点击分享按钮时,它会说试试这个食谱"然后有网址等.谢谢.

I'm trying to figure out how I can output the string of text Try this recipe at the beginning of this twitter sharing function. So when you click the button to share it will say "Try this recipe" then have the url etc. Thank you.

function load_twitter() {
    var load = window.open('http://twitter.com/share?url='+ window.location.href +'&via=atsbyvermouth','','scrollbars=no,menubar=no,height=450,width=650,resizable=yes,toolbar=no,location=no,status=no');
}

推荐答案

很简单,先加上这个text=Try this recipe&,即

It's very simple, just add this text=Try this recipe& at first, i.e.

function load_twitter() { 
    window.open('http://twitter.com/share?text=Try this recipe&url='+ window.location.href +'&via=atsbyvermouth','','scrollbars=no,menubar=no,height=450,width=650,resizable=yes,toolbar=no,location=no,status=no'); 
}

演示.

这篇关于将文本附加到 Twitter 共享链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆