Twitter App Card and custom app.url.*


#1

I’m specifying a custom “twitter:app:url:iphone” meta tag like the following:

But, the Twitter Card Validator is saying the URL is invalid. How do I get my app to launch without changing the URL scheme to the scheme my application handles?

What form of URL is Twitter Card expecting?


#2

Hi Ronald,

Is your app’s scheme “com.acme://”, or just “acme://”?

The “twitter:app:url:iphone” is the URL that other apps on the platform can use to open your app. Typically, this is something like “acme://article?id=1234” or similar. Apple’s docs [1] also shed more light on how to use the URL schemes.

[1] http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW50

-Sean


#3

Apple gives specific advice on what URL scheme to define for your product. If you want to define a generic data/function type, then use a generic term/string: “http”, “mailto”, “sms”, “audio” or something similar. If you want your specific application to be targeted/launched, then:

CFBundleURLName - A string containing the abstract name of the URL scheme. To ensure uniqueness, it is recommended that you specify a reverse-DNS style of identifier, for example, com.acme.myscheme.

In this case, I want my app “Acme” to be launched with the URL. So, I want to use my application identifier as the scheme. Also, my application handles that URL as defined in the Info.plist.

But, the Twitter Card validator flags this URL as invalid. Why?


#4

Reading the documentation at the weblink provided gives me this instruction:

CFBundleURLName
A string containing the abstract name of the URL scheme. To ensure uniqueness, it is recommended that you specify a reverse-DNS style of identifier, for example, com.acme.myscheme.
The string you specify is also used as a key in your app’s InfoPlist.strings file. The value of the key is the human-readable scheme name.

So, we are using the app identifier as the scheme so that our application is launched, rather than some other application.

Why is the link rejected in the validator?
It seems the validator and the Twitter Card app:url property needs to accept app identifier based URL schemes, as in:

Ron