Hi Rich, You can't be guaranteed to always have a display_url (there will be many historical tweets without it, or perhaps the service that negotiates display_urls will be down), so you should code defensively, making use of them when they are present but choosing an alternate display method when it is absent.
display_url, as you've noted, is also a misnomer since the string contained within the field is technically not a URL, but just a string to display instead of the URL. expanded_url should always be safe to assume as actually being a URL. While it should be safe to assume that all t.co links will have an expanded_url as well as a display_url, I'd still code defensively in the event that something goes wrong. Thanks, Taylor On Sat, Sep 11, 2010 at 5:28 AM, Rich <rhyl...@gmail.com> wrote: > Hi > > I have a question for the API team. I notice that display_url doesn't > contain the protocol e.g. http:// or https:// yet expanded_url does. > > Would I be safe to assume that a <url>http://t.co/xxxxxx</url> would > always contain an expanded_url as well as a display_url? > > Richard > > -- > Twitter developer documentation and resources: http://dev.twitter.com/doc > API updates via Twitter: http://twitter.com/twitterapi > Issues/Enhancements Tracker: > http://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > http://groups.google.com/group/twitter-development-talk?hl=en > -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk?hl=en