Chris Chris - 9 days ago 9
iOS Question

Deep linking to Facebook Messenger

From a lot of searching, I found that using

fb-messenger://user-thread/ID
can be used to deep link to Messenger and open the existing thread with the passed in FB ID or start a new thread if not existent.

It pops over to Messenger and opens a thread, but the thread is with
Facebook User
and doesn't actually send. See image below. Clicking Facebook User in the header goes to a detail view with the correct user's image and name.

How do I make this work correctly?


Answer

As WizKid (FB Employee) said here:

...there is no documented way to interact with ... [Messenger] so anything you do may break at any second.

So with that in mind, it sounds like fb-messenger://user-thread/ID has been deprecated. That being said, I decompiled the Facebook Android APK and found a line:

return Uri.parse((new StringBuilder("fb-messenger://user/")).append(Uri.encode(s)).toString());

So from what I can see, it looks like fb-messenger://user-thread/ID has been replaced with fb-messenger://user/ID

There's also a line thats:

return Uri.parse((new StringBuilder("fb-messenger://thread/")).append(Uri.encode(s)).toString());

So fb-messenger://thread/ID may be valid too. ID could be a user or thread ID, I didn't dig deep enough to find out.

Comments