当通过api发布时,T.co混淆了我的url


t.co messing up my url when posting through api

我使用php和twitter api库-当我通过以下代码发送我的消息时,我的链接搞砸了-据我所知,我正在使用标准twitter php api?

$result = $this->tweet->call('post', 'statuses/update', array('status' => $title));

在我发布

之前
testing link tracking http://bit.ly/tvHaWN

post

testing link tracking http://t.co/ptdXXNDH<br>

还有人有类似的问题吗?

我可以建议您的$title变量包含混合文本和HTML。Twitter状态必须是纯文本。剥离标签应该有帮助。

尝试剥离$title变量内的所有HTML标签。

例如:

$result = $this->tweet->call('post', 'statuses/update', array('status' => strip_tags($title)));