0
有誰知道如果twitter分享按鈕的文本中不允許有問號嗎?我有以下代碼,當我點擊共享並彈出按鈕時,消息停在「誰是你最喜歡的候選人」。它不會讀取通過問號的文本。twitter分享按鈕中的問號
<?php
$text = "Who's your favorite candidate ? This is another message";?>
<a href="https://twitter.com/share?text=<?php echo $text; ?>&url=<?php echo $decoded_url; ?>&hashtags=contesthashtag" class="twitter-share-button" data-lang="<?php echo $lang; ?>" data-hashtags="contesthashtag" data-url="<?php echo $fanpage_url; ?>" data-text="<?php echo $text; ?>">Click here to share on Twitter</a>
THANKs alot!
你不需要在添加到鏈接之前對'$ text'進行URL編碼嗎?所以,試試像'<?php echo urlencode($ text); ?>' – 2013-02-26 21:46:56