如何启动Facebook Messenger,以使用户能够进行用户聊天 [英] How can I launch facebook messenger with to enable user to user chat
本文介绍了如何启动Facebook Messenger,以使用户能够进行用户聊天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用户通过facebook sdk登录到我的应用程序.如果一个用户单击另一个用户,我希望使他们能够通过facebook Messenger聊天.我可以从我的应用程序启动Messenger,但是有一种方法可以与特定用户一起启动聊天屏幕.
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.
推荐答案
您可以在Messenger中打开具有深层链接的对话:
You can open a conversation in Messenger with deep links:
-
http://m.me/{user_name}
<-这是Messenger的官方链接.您需要向用户询问其Messenger的用户名. -
fb-messenger://user/{user_id}
<-此链接未记录,因此可以随时断开(深层链接).user_id
可能是Facebook用户ID,因此更容易获取,但是您需要请求user_profile
权限才能获取用户ID(
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 foruser_profile
permission to get user id (Messenger Permissions)
这篇关于如何启动Facebook Messenger,以使用户能够进行用户聊天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文