开发者

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

开发者 https://www.devze.com 2023-04-12 04:59 出处:网络
Twitter search API results returned like the below values ( [source] => <a href=\"http://twitter.com/\">web</a>

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

精彩评论

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