Custom Uri Schemes for the Facebook Messenger

Custom URI Schemes for the Facebook Messenger

After unsuccessfully searching for this information, I've decided to make a list of my own. Below is what I managed to gather so far, along with a few explanations:

These were taken from version 141.0.0.25.76 (October 21, 2017):

fb-messenger://accounts
fb-messenger://active_now
fb-messenger://addcard
fb-messenger://addmembers
fb-messenger://android_date_time
fb-messenger://android_storage
fb-messenger://autocompose
fb-messenger://autocompose_payment
fb-messenger://bots/get_started/?page_id=%s&cta_id=%s
fb-messenger://business
fb-messenger://business/
fb-messenger://business_extensions
fb-messenger://buy/mc?item_id={#%s}
fb-messenger://callsearch
fb-messenger://commerce/
fb-messenger://compose
fb-messenger://contactmigration
fb-messenger://contacts
fb-messenger://contacts/add_contacts
fb-messenger://contactuploadoptin
fb-messenger://direct_share
fb-messenger://drawoverotherapps
fb-messenger://games
fb-messenger://groupcompose
fb-messenger://groupstab
fb-messenger://groupthreadfbid/
fb-messenger://groupthreadfbid/%s
fb-messenger://ig_contact_import
fb-messenger://installupdate
fb-messenger://instant_article/?article_id=
fb-messenger://instant_article/?article_id=%s
fb-messenger://invite
fb-messenger://join_request
fb-messenger://mai
fb-messenger://messagerequests
fb-messenger://messagesearch
fb-messenger://montage
fb-messenger://montage_composer
fb-messenger://montage_mediapicker
fb-messenger://montageaudiencepicker
fb-messenger://montagecomposer
fb-messenger://networkempathy
fb-messenger://new
fb-messenger://newuser/
fb-messenger://newuser/signup?provider_name=%s&provider_page_fbid=%s
fb-messenger://nfc
fb-messenger://omni_m
fb-messenger://opengrouppreview
fb-messenger://opengrouppreview?group_preview_hash=
fb-messenger://optimistic
fb-messenger://optimistic/%s
fb-messenger://payments
fb-messenger://payments/
fb-messenger://platform
fb-messenger://platform/cta/postback/?cta_id=%s
fb-messenger://platform/share/?cta_id=%s
fb-messenger://ride_map/{%s}
fb-messenger://roomcompose
fb-messenger://rtccall
fb-messenger://sampleflows
fb-messenger://settings
fb-messenger://settings/datasaver
fb-messenger://settings/messengeronlybackup
fb-messenger://settings/montage
fb-messenger://settings/notifications
fb-messenger://settings/people
fb-messenger://settings/phoneevents
fb-messenger://settings/profilepicture
fb-messenger://settings/tincan
fb-messenger://share < Used for sharing multimedia, contains
several extras. See more info below.
fb-messenger://sms
fb-messenger://sms/
fb-messenger://sms/%s
fb-messenger://sms-bridge
fb-messenger://sms-takeover
fb-messenger://sms-takeover/nux?context=%s
fb-messenger://sms-takeover/nux?context=%s&thread_id=%s
fb-messenger://sms-takeover/sms_anonymous_chat_head
fb-messenger://stickerstore
fb-messenger://thread/ < Deprecated
fb-messenger://threadkeystring
fb-messenger://threads
fb-messenger://threadsettings
fb-messenger://user
fb-messenger://user/
fb-messenger://user/%s < Opens chathead/conversation with user %s, where
%s is the numeric fb user id. Using a username
string here crashes the orca app.
fb-messenger://user/%s?ref=%s&ref_source=%s
fb-messenger://verifyphonenux
fb-messenger://voip
fb-messenger://wave

These are some additions taken from version 293.0.0.13.232 (December 8th 2020):

fb-messenger://carrier_messaging/
fb-messenger://carrier_messaging//%s
fb-messenger://carrier_messaging_group/
fb-messenger://carrier_messaging_group//%s
fb-messenger://dialtone/switch_to_dialtone
fb-messenger://instant_games/play?game_id=
fb-messenger://m.me/
fb-messenger://payments/checkout/?product_type=pages_commerce&product_id=
fb-messenger://payments/paypal_close/
fb-messenger://payments/settings
fb-messenger://paypal_connect_fail/
fb-messenger://paypal_connect_success/
fb-messenger://settings/datasetting
fb-messenger-sametask://instant_games_contact_pick
fb-messenger-sametask://montage_mediapicker
fb-messenger-sametask://share
fb-messenger-sametask://threadsettings
fb-messenger-secure://accounts
fb-messenger-secure://accounts/triggersso
fb-messenger-secure://join_request
fb-messenger-secure://messagerequests
fb-messenger-secure://messagesearch
fb-messenger-secure://notification_to_account_switch
fb-messenger-secure://page_notification_direct_reply
fb-messenger-secure://page_rtc_notification_to_account_switch
fb-messenger-secure://rtccall/audio/%s
fb-messenger-secure://speakeasy_invite_list

Here are some URI schemes whose purpose in this app I don't know:

  • fb:// - see possible URIs of this scheme here.
  • dialtone://
  • fbinternal://
  • fb-messenger-aol://
  • fb-messenger-assistant://
  • fb-messenger-lite://
  • fb-messenger-lite-secure://
  • fb-messenger-public://
  • fb-messenger-secure://
  • fb-work://

Investigation of fb-messenger://share (from older version of this post - may be invalid):

  • Has a StringExtra called ShareType that can be: ShareType.invite, ShareType.forward, ShareType.regular.
  • Has an optional (?) StringExtra called ShareType.invitedUser.
  • Has an optional (?) StringExtra called ShareType.invitedUserDisplayName.
  • Has an optional (?) StringExtra called ShareType.inviteEntryPoint.
  • Has an optional (?) StringExtra called ShareType.invitesSentBroadcastAction.
  • (several others)

In the case of ShareType.forward:

  • Has an Extra with the tag "attachment" OR "message".
  • Has an Extra with the tag "trigger".

###Extra fields of a share Intent (tag : type):###

  • android.intent.extra.TEXT : String
  • attachment : Parcelable
  • message : Parcelable
  • page_name : String
  • page_post_id : String
  • page_target : Long
  • send_as_message_entry_point : String
  • share_attachment_url : String
  • share_caption : String
  • share_description : String
  • share_fbid : String
  • share_link_url : String
  • share_media_url : String
  • share_return_to_fb4a : Boolean
  • share_robotext : String
  • share_story_url : String
  • share_title : String
  • ShareType : String
  • target_recipients : StringArray
  • title : String
  • trigger : String

The required functionality may be achieved by using fb-messenger://user/{user-id} instead of fb-messenger://user-thread/{user-id}.

Note that {user-id} is the user's global numeric ID (e.g. for Zuck it's 4), which can be obtained (as of Nov. 2015) by parsing the html document that corresponds to the person's user name (e.g. for Zuck it's https://www.facebook.com/zuck) and extracting the "entity_id" that is found inside.

According to my latest test, app-scoped user IDs, which are usually the IDs available to developers, do not work for this!

Below is a python3 script that extracts the global ID for a known username (credit: Paul Schreiber):

#!/usr/bin/python

import requests
import re

url = 'https://www.facebook.com/zuck'
idre = re.compile('"entity_id":"([0-9]+)"')
page = requests.get(url)
print(idre.findall(page.content.decode()))

Alternatively, this site can be used to achieve the same thing.

Please also note that this method is not officially supported and might even get your app banned by FB.

Custom URL to launch Facebook Messenger on iOS

sample ,It's work for me in ios

let msgUrl = URL(string: "http://m.me/{PAGE_NAME}")
UIApplication.shared.openURL(msgUrl)

reference in document of dev facebook : https://developers.facebook.com/docs/messenger-platform/discovery/m-me-links/

What are all the custom URL schemes supported by the Facebook iPhone app?

June 2014 EDIT: Here is the updated list from Facebook v12:

fb://album?id=%@
fb://background_location
fb://browse?semantic=%@&result_type=%d&source_type=%d&title=%@
fb://codegenerator
fb://composer?%@
fb://composer?pagename=%@&pageid=%@
fb://composer?target=%@
fb://composer?view=location
fb://contactimporter/?ci_flow=%d
fb://discovery
fb://entitycards/?ids=%@&source=%@
fb://event?id=%@
fb://event?id=%@&post_id=%@
fb://eventguestlist?event_id=%@
fb://events/list
fb://eventslist?owner_fbid=%@
fb://f(.+)(\?|&)v=map(\&.*)?
fb://f(.+)incorrect_map_pin(\&.*)?
fb://friendsnearby
fb://friendsnearby/?source=%@
fb://friendsnearby/?source=divebar
fb://friendsnearby/ping?fbid=%@&source=%@
fb://friendsnearby/profile?fbid=%@&source=%@
fb://gift?
fb://group?id=%@
fb://group?id=%@&object_id=%@&view=permalink
fb://hashtag/
fb://hashtag/%@
fb://location_settings
fb://messageComposer?
fb://messaging/new
fb://messaging/new?id=%@&name=%@&isPage=%d
fb://messaging?
fb://messaging?id=%@
fb://messaging?id=%@&%@
fb://messaging?tid=%@
fb://messaginglist
fb://page?id=%@
fb://page?id=%@&source=%@&source_id=%@
fb://page_about?id=%@
fb://page_friend_likes_and_visits?id=%@
fb://page_reviews?id=%@
fb://photo?%@
fb://photo?id=%@
fb://pnp?type=instructions
fb://products?%@
fb://profile
fb://profile/%@
fb://profile?id=%@
fb://profile?id=%@&%@=%@
fb://story?%@
fb://story?graphqlid=%@
fb://story?id=%@
fb://timelineappsection?id=%@
fb://topic/%@
fb://uploadcoverphoto
fb://zrnext

April 2013 EDIT : Looks like none of below works anymore with latest versions, facebook app navigation probably has been rewrited. Some reverse engineering to do on latest version...

I guess that might help, that's from v3.4 :

fb://album/%@
fb://album/(aid)
fb://album/(aid)/cover
fb://album/(initWithAID:)
fb://album/(initWithAID:)/cover
fb://album/new
fb://albums
fb://birthdays
fb://birthdays/(initWithMonth:)/(year:)
fb://birthdays/(month)/(year)
fb://chat/(fbid)
fb://chat/(initWithUID:)
fb://chat/(user.fbid)
fb://contactimporter
fb://contactimporter/invites
fb://contactimporter/legalese
fb://contactimporter/modal
fb://event/%@
fb://event/%llu
fb://event/(event.fbid)/members/(rsvpStatus)
fb://event/(fbid)
fb://event/(fbid)/members/attending
fb://event/(fbid)/members/declined
fb://event/(fbid)/members/not_replied
fb://event/(fbid)/members/unsure
fb://event/(fbid)/rsvp
fb://event/(initWithEventId:)
fb://event/(initWithEventId:)/members/(rsvpStatus:)
fb://event/(initWithEventId:)/rsvp
fb://events
fb://events/
fb://faceweb/(initWithURL:)
fb://facewebmodal/(initWithURL:)
fb://feed
fb://feed/%@
fb://feed/(filter.filterKey)
fb://feed/(initWithFilterKey:)
fb://feedfilters
fb://findfriends
fb://findfriends/legalese
fb://findfriends/modal
fb://friends
fb://friends/picker
fb://friends/sync
fb://friends/sync/(removeData:)
fb://friends/sync/disconnect
fb://friends/sync/legalese
fb://group/(fbid)/members
fb://group/(initWithGroupId:)/members
fb://groups
fb://launcher
fb://mailbox
fb://mailbox/(folder)
fb://mailbox/(initWithFolder:)
fb://mailbox/(initWithFolder:)/(tid:)
fb://mailbox/(mailbox.folder)/(tid)
fb://mailbox/compose
fb://mailbox/compose/(fbid)
fb://mailbox/compose/(initWithUID:)
fb://map
fb://messaging
fb://messaging/(folder)
fb://messaging/(initWithFolder:)
fb://messaging/(initWithFolder:)/(tid:)/participants
fb://messaging/(initWithFolder:)/thread?tid=(tid:)
fb://messaging/(mailbox.folder)/(urlEscapedTid)/participants
fb://messaging/(mailbox.folder)/thread?tid=(urlEscapedTid)
fb://messaging/compose
fb://messaging/compose/(fbid)
fb://messaging/compose/(initWithUID:)
fb://messaging/original_message?mid=(commentId)
fb://messaging/original_message?mid=(initWithMessageId:)
fb://nearby
fb://note/%@
fb://note/(initWithNoteId:)
fb://note/(initWithNoteId:)/edit
fb://note/(noteId)
fb://note/(noteId)/edit
fb://note/compose
fb://notes
fb://notifications
fb://online
fb://online#offline
fb://online#online
fb://page/(page.id)
fb://pages
fb://photo/%@/0/%@
fb://photo/(album.user.fbid)/(album.aid)/(pid)
fb://photo/(album.user.fbid)/(album.aid)/(pid)/feedback
fb://photo/(fbid)/profilepic
fb://photo/(initWithProfilePicturesUID:)/profilepic
fb://photo/(initWithUID:)/(aid:)/(pid:)
fb://photo/(initWithUID:)/(aid:)/(pid:)/feedback
fb://photosapp
fb://place/%@
fb://place/(initWithPageId:)
fb://place/(targetId)
fb://place/addfriends
fb://place/addphoto
fb://place/create
fb://places
fb://places/%lld/%lld
fb://places/(initWithCheckinAtPlace:)/(byUser:)
fb://places/legalese/tagged/%lld/%lld
fb://places/legalese/tagged/(initWithTaggedAtPlace:)/(byUser:)
fb://post/%@
fb://post/%@_%@
fb://post/(initWithPostId:)
fb://post/(initWithPostId:)/tagged
fb://post/(postId)
fb://post/(postId)/tagged
fb://post/(postId)/untagSelf
fb://post/(untagSelfFromPostWithId:)/untagSelf
fb://profile
fb://profile/
fb://profile/%@
fb://profile/%lld
fb://profile/(addFan:)/addfan
fb://profile/(fbid)
fb://profile/(fbid)/addfan
fb://profile/(fbid)/addfriend
fb://profile/(fbid)/fanpages
fb://profile/(fbid)/fans
fb://profile/(fbid)/favorite
fb://profile/(fbid)/friends
fb://profile/(fbid)/info
fb://profile/(fbid)/menu
fb://profile/(fbid)/mutualfriends
fb://profile/(fbid)/photos
fb://profile/(fbid)/poke
fb://profile/(fbid)/removefriend
fb://profile/(fbid)/wall
fb://profile/(initWithFBID:)/menu
fb://profile/(initWithFansUID:)/fans
fb://profile/(initWithFriendsUID:)/friends
fb://profile/(initWithInfoUID:)/info
fb://profile/(initWithMutualFriendsUID:)/mutualfriends
fb://profile/(initWithPhotosUID:)/photos
fb://profile/(initWithUID:)
fb://profile/(initWithUID:)/addfriend
fb://profile/(initWithUID:)/fanpages
fb://profile/(initWithUID:)/poke
fb://profile/(initWithUID:)/removefriend
fb://profile/(initWithWallUID:)/wall
fb://profile/(toggleFavorite:)/favorite
fb://profile/(user.fbid)/fans
fb://profile/(user.fbid)/friends
fb://profile/(user.fbid)/mutualfriends
fb://profile/0
fb://publish
fb://publish/mailbox/(initWithFolder:)/(tid:)
fb://publish/mailbox/(mailbox.folder)/(tid)
fb://publish/photo/(album.user.fbid)/(album.aid)/(pid)
fb://publish/photo/(initWithUID:)/(aid:)/(pid:)
fb://publish/post/(initWithPostId:)
fb://publish/post/(postId)
fb://publish/profile/(fbid)
fb://publish/profile/(initWithUID:)
fb://publish/profile/(owner.fbid)
fb://requests
fb://root
fb://upload
fb://upload/%@/album/%lld/%@
fb://upload/%@/checkin/%lld
fb://upload/%@/profile/%lld
fb://upload/(initWithSource:)/album/(uid:)/(aid:)
fb://upload/(initWithSource:)/checkin/(checkinId:)
fb://upload/(initWithSource:)/profile/(uid:)
fb://upload/actions
fb://upload/actions/album/(initWithUID:)/(aid:)
fb://upload/actions/album/(user.fbid)/(aid)
fb://upload/actions/checkin/(checkinId)/
fb://upload/actions/checkin/(initWithCheckinId:)
fb://upload/actions/newalbum
fb://upload/actions/profile/(fbid)
fb://upload/actions/profile/(initWithUID:)
fb://upload/actions/resume
fb://upload/album/(showUploadMenuWithUID:)/(aid:)
fb://upload/album/(user.fbid)/(aid)
fb://upload/checkin/(checkinId)
fb://upload/checkin/(showUploadMenuWithCheckinID:)
fb://upload/discard
fb://upload/profile/(fbid)
fb://upload/profile/(owner.fbid)
fb://upload/profile/(showUploadMenuWithUID:)
fb://upload/resume
fb://userset
fb://video/%@
fb://video/(playVideoWithId:)
fb://video/(videoId)

What are all the custom URL schemes supported by the Workplace by Facebook iPhone app?

I recently had the same issue and found out that the main url scheme for Workplace is fbatwork.

To open the app straight to a group, the only working format on iOS seems to be

fbatwork://group?id=your-group-id

There are also a few more available, but I don't know exactly what's their purpose: fbatworksso, fbatworksignup, fbatworkssoreauth, fb-work-emailless

Share in Facebook app using URL scheme

The Facebook URL Schemes shift a lot, and their functionality is generally not well documented. There was an attempt to catalog them at
What are all the custom URL schemes supported by the Facebook iPhone app?

If you can settle for opening the dialog in the browser, you can use the Share Dialog:

https://developers.facebook.com/docs/sharing/reference/share-dialog



Related Topics



Leave a reply



Submit