This might sound complicated but basically all the IM apps in the appstore (over 30 of them) have this functionality where a user can send an IM containing a URL and the receiving end can click on it and open the page in an in-app browser.
Yet what you want are custom callbacks, so this is a different functionality. They may be using UITextViews.
You'll probably have to write the code yourself, e.g. text rendering and link detection, or modify TTStyledTextLabel (which, in either case, looks like a good place to start). I do something similar and I just create UIButtons over any links. For link detection code check out Adium's source.