views:

622

answers:

1

I've got an app that I want to be able to use Custom URL schemes for. I want users to be able to open Tweetie using the Custom URL protocol however I need to populate the tweet with dynamic website link which I get using currentItem.link.

I found this code which launches Tweetie and populates a message with static information:

NSString *shortened_url = @"http://your.url.com";
NSString *stringURL = [NSString stringWithFormat:@"tweetie://%@", shortened_url];
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];

So using the above code how would I populate the message with currentItem.link information?

Thanks.

A: 

It depends entirely on the application on the receiving end. You have to find out how their protocol works, then you can use their protocol as it is designed.

Adding a http:// protocol URL to the end of a tweetie:// protocol URL is not the correct method, and searching for how the Tweetie URL protocol works would be suggested.

chpwn
Actually according to one site you can have http:// after the tweetie protocol. But I'm stuggling to actually get the currentItem.link into the Tweetie Custom URL at the moment.
Graeme