No Custom URL (iOS) Support



I’m puzzled as to why Twitter doesn’t allow custom url schemes to be used. Is there a reason they are forcing authentication through a server?

I might be missing a way to use a custom url…but every time I enter “MyApp://” (where MyApp is my app’s name) into the Callback URL field, it rejects it with the message: “The client application failed validation: Not a valid URL format.”

What’s the workaround here? Is integrating “Fabric” the only way to utilize Twitter’s REST API? Having to integrate yet another framework to use Twitter’s API is a massive headache.


Can you describe what you want to achieve here? I’m not clear based on your thread. Do you want to launch the iOS Twitter app from yours? Confused.


I’m not sure what’s confusing you. I’ll try and explain the situation as clearly as possible.

The end goal is to authorize my app so I can send out a tweet using my app with one click. (In reality, it’s a lot more complex than that. But as far as Twitter is concerned it boils down a tweet)

Let’s say the app I’m developing is called…"ExampleApp"
The flow to authorize ExampleApp normally looks like this:

ExampleApp -> Authorization Page -> Redirect BACK to ExampleApp (iOS) via Custom URL Scheme

The redirect back to the ExampleApp is easily accomplished by setting up a custom URL scheme, such as “exampleApp://”, within my app’s settings. Most services allow a custom URL Scheme to be used as the callback URL when registering an application for API access. This enables the developer to get a callback directly to the app.

Twitter, however, will only accept an HTTP/HTTPS scheme for the callback URL I would have to have my own website that receives the callback, and redirects to my app using my custom URI scheme. Visually, the flow for Twitter looks like this:

ExampleApp -> Authorization Page -> Callback is sent to “…” ->…” redirects to app using custom URL scheme (exampleApp://)

Does this make more sense?


Yes, I believe so - you’d like to enter the iOS app URL on the OAuth callback page, by the sounds of it. Unfortunately we don’t support that at this time, so I’d have to suggest using Sign in with Twitter in Twitter Kit.


I suppose the point of this thread wasn’t so much asking how to use a custom URL scheme with It’s more that I’m asking why it isn’t implemented already, and suggesting that it’s an important missing feature that nearly every social media service offering a public API offers.


Additionally, Twitter Kit only allows Tweets to be sent when composed using a twitter pop up. This won’t work for my purposes. I’m looking to send updates to a variety of social media sources at once. One message sent to multiple sites, with only one click needed.


OK, thanks for the additional context. For Twitter, mobile and custom URL schemes came later (although in many ways we were born on mobile, the API was originally web-first), so that’s probably why this is the case. Happy to let the teams know that this is an open request for the community, but I cannot promise any timeline for this to be changed in the immediate future. Thanks for the information, and sorry I can’t fix it for you right away! :smiley:

response to the edit - yes - that’s absolutely the intent of Twitter Kit. I understand you’d like to multi-post, but you would have to do some additional work there. To be fair, you could use the sign-in with Twitter capability, and then the TwitterAPIClient class, but you would not be able to use the TweetComposer, and you would have to make it very clear to your users that the result of their Twitter authentication would be to provide you access to post to multiple sources.