twitter 分享链接
click here.
请单击此处 。
So, you want to display your Twitter status on your blog? No problem, use the API. But, what if you want to display links in your status like twitter.com itself does? No problem, use regular expressions.
那么,您想在博客上显示Twitter状态吗? 没问题,请使用API。 但是,如果您想像Twitter.com本身那样以状态显示链接怎么办? 没问题,使用正则表达式。
Here is a function that will turn all HTTP URLs, Twitter @usernames, and #tags into links:
这是一个将所有HTTP URL,Twitter @usernames和#tags转换为链接的函数:
PHP (The PHP)
function linkify_twitter_status($status_text)
{
// linkify URLs
$status_text