how to start android facebook app chat from another app

前端 未结 2 1876
-上瘾入骨i
-上瘾入骨i 2021-01-03 05:30

I\'ve seen other topics like this: launch facebook app from other app and tried some of the URIs listed there, but I can\'t figure out how to start the facebook chat with a

相关标签:
2条回答
  • 2021-01-03 06:01
    startActivity(new Intent(Intent.ACTION_VIEW,
                  Uri.parse("fb://messaging/" + userId)));
    
    0 讨论(0)
  • 2021-01-03 06:12

    found it here: https://developers.facebook.com/docs/messenger-platform/discovery/m-me-links#format

    http://m.me/{#user_id}
    

    you can use this URI to open messaging with a friend with known id.

    You can start the intent like below

    startActivity(new Intent(android.action.VIEW, "http://m.me/{#user_id}"));
    
    0 讨论(0)
提交回复
热议问题