Custom URI Schemes for the Facebook Messenger

后端 未结 5 1612
野性不改
野性不改 2020-11-27 16:21

Given the recent \"encouragement\" by Facebook to migrate to a separate messenger app, and as a followup to the {very informative!} answer to the question on URL/URI schemes

5条回答
  •  孤独总比滥情好
    2020-11-27 16:44

    With current version Facebook on android automatically ask user to open the app or open in chrome when you use their domain www.messenger.com It's better to just redirect user to this url and let facebook handle it

    https://www.messenger.com/t/{username-or-page-name-here}

    Intent intent;
    intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.messenger.com/t/{username-or-page-name-here}"));
    startActivity(intent);
    

提交回复
热议问题