是否可以从 Twitter API 缩短 url? [英] Is it possible to shorten url from Twitter API?
问题描述
有没有办法从 API 中获取缩短的 t.co 网址?在通过 API 发布推文之前,我需要缩短一个 url.我应该怎么做这个?这是 Twitter API 支持的还是我必须使用其他一些像bit.ly这样的网址缩短器?
Is there a way to get the shortened t.co url from the API? I need to shorted a url before posting tweet via API. How should I do this? Is this supported by Twitter API or do I have to use some other url shortener like bit.ly?
推荐答案
除了通过 Twitter 发送状态更新或直接消息之外,不可能通过任何方式使用 t.co 缩短链接.来自 Twitter 支持网站:
It isn't possible to shorten links using t.co through any means other than sending status updates or direct messages via Twitter. From the Twitter support site:
http://t.co 的链接服务仅用于在 Twitter 上发布的链接,不能作为一般的缩短服务提供.
The link service at http://t.co is only used on links posted on Twitter and is not available as a general shortening service.
所以,是的,您需要使用其他一些缩短服务.
So, yes, you'll need to use some other shortening service.
这篇关于是否可以从 Twitter API 缩短 url?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!