Custom URL to launch Facebook Messenger on iOS

software is fun picture software is fun · Nov 18, 2013 · Viewed 27.9k times · Source

How can I launch FaceBook Messenger (if installed) with a compose Windows to a specific FB ID.

If messenger is not installed, can we launch FaceBook app and have the compose Windows open to a specific FB ID.

In the rare instance if no Facebook apps are installed, can we launch mobile Safari with the compose window?

Answer

tia picture tia · Dec 2, 2013

The URL scheme is fb-messenger://user-thread/{user-id}. I just build my app with fb-messenger URL scheme as Viewer and trapped the URL on the UIApplication delegate. The user-id parameter is long integer one, as in https://developers.facebook.com/docs/graph-api/reference/user/

enter image description here