推特点击链接与推特用户


Tweet clickable links with twitteroauth?

我使用的是来自https://github.com/abraham/twitteroauth像这样:

 $Twitter = new TwitterOAuth(...);
 $Twitter->post('statuses/update', array('status' => 'click <a href="http://google.com">here</a>'));

推特网址显示为纯文本,不可点击。如何发布真正的链接?

您是否尝试过使用HTML标记和http://-posting发布链接http://www.google.com与www.google.com相比,我使用相同的API,这似乎对我有效,但像在HTML中那样创建超链接似乎不起作用。现在我想起来了,我不知道我曾经在Twitter或TweetDeck中遇到过超链接风格的链接,只是URL通过一个shortener运行。。。

您不需要<a/>标签发布到Twitter的链接。这样做:

 $Twitter = new TwitterOAuth(...);
 $Twitter->post('statuses/update', array('status' => 'click here: http://google.com'));

我认为这是一个Twitter问题,它转义了所有HTML代码:http://support.twitter.com/entries/13920-frequently-asked-questions#html