我想在我的网站上显示一个帐户的推文。问题是推文总是以 format 出现http://t.co/...
,而不是我想要的完整链接。
例如,我获得:
the rules of the game are all implemented - local players can play together in this link: http://t.co/Nf7j4TaB
if you are very curious... then, here is the link to the xodul's section under development: http://t.co/6Zbti36T
etc...
我希望这些推文看起来像这样:
the rules of the game are all implemented - local players can play together in this link: http://xodul.com/tests/js/
if you are very curious... then, here is the link to the xodul's section under development: http://xodul.com/tests
etc...
为了使我的应用程序,我遵循了以下说明:
使用 Twitter API 版本 1.1 检索 user_timeline 的最简单 PHP 示例(从这里我们可以获取每条推文的文本,链接格式为http://t.co/...
:)
使用 Get Statuses API 1.1 时在推文中呈现链接(此链接中得分最高的答案的代码替换了,例如,"http://t.co/Nf7j4TaB"
带有超链接的文本"<a target='_blank' href='http://t.co/Nf7j4TaB'>http://t.co/Nf7j4TaB</a>"
)
我非常感谢有关如何呈现 twitter 链接的任何帮助!