嗨,大家好,我基本上有一个叫做$ content [topic]的东西,它在php中会显示该话题,可能是“ Platformers What Are Are”之类的东西。
但是,当用户单击我的Twitter共享按钮时,它只会显示“ PLATFORMERS [The LINK]”,而不会显示我想要显示的整个标题,我该如何解决?
这是我正在使用的共享按钮的代码
<a href=https://twitter.com/intent/tweet?url=http://www.sentuamessage.com/blog.php?who=$content[id]&text=$content[topic]&hashtags=blogs,SentUAMessage target=new>Image Here</a>
有任何想法吗?
您需要对所有变量进行URL编码。
就您而言,请执行类似...的操作。
$URL = "https://twitter.com/intent/tweet?"
+ "url=" + urlencode("http://www.sentuamessage.com/blog.php?")
+ "&who=" + urlencode($content[id])
+ "&text=" + urlencode($content[topic])
+ "&hashtags=" + urlencode("blogs,SentUAMessage");
基本上,请确保所有内容均已正确编码。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句