How can I launch facebook messenger with to enable

2019-08-23 22:27发布

Users log into my app through the facebook sdk. If one user clicks on another user I'd like to enable them to chat via facebook messenger. I can launch messenger from my app, but is there a way to launch into the chat screen with a specific user.

1条回答
对你真心纯属浪费
2楼-- · 2019-08-23 23:07

You can open a conversation in Messenger with deep links:

  • http://m.me/{user_name} <- this is official link for Messenger. You'll need to ask user for his Messenger's username.
  • fb-messenger://user/{user_id} <- this link is not documented, so it can break any time (Deep linking). user_id probably is the Facebook User Id, so it will be easier to obtain, however you'll need to ask for user_profile permission to get user id (Messenger Permissions)
查看更多
登录 后发表回答