开发者

Twitter search API results results['text'] value does not have the a href tags

Twitter search API results returned like the below values

(                        
                    [source] => <a href="http://twitter.com/">web</a>
                    [text] => #prabhu linked into #app开发者_C百科tivo via http://t.co/eWTJLj6Y
                    [to_user_id] => 
                    [to_user_id_str] => 
)

Here, [text] => #prabhu linked into #apptivo via http://t.co/eWTJLj6Y

we don't have the tags for the "http://t.co/eWTJLj6Y" url and #prabhu (hash tag)

how can we get the urls for "http://t.co/eWTJLj6Y" url and #prabhu?


You can parse them for URLs with a URL regex and add link and the same with hashtags (/(#\w+)\b/ should do it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜