0

After calling facebook messenger from an android app with:

Long targetId = UID_HERE;
Uri uri = Uri.parse("fb-messenger://user/");
uri = ContentUris.withAppendedId(uri, targetId);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

is there any way to let the caller app know the facebook user id which will be interacting in facebook messenger?

Josué Lima
  • 483
  • 6
  • 18
  • most likely not, but what´s the use case anyway? – andyrandy Feb 22 '16 at 23:09
  • @WizKid I was reading about it: https://developers.facebook.com/docs/messenger/android#intent_metadata_user_ids and trying to figure out how to create this integration – Josué Lima Feb 23 '16 at 01:16

1 Answers1

0

This is trick to send messenger facebook to another user with user id. Now, In facebook api, user id of user in response is a scope user id. And it can not use with your trick.

Sinh Phan
  • 1,180
  • 3
  • 16
  • 36
  • anyway to set a callback to be executed by facebook messenger? I see it has some communication from messenger to the caller app, but didn't understand the whole picture. – Josué Lima Feb 23 '16 at 03:51
  • your trick is open facebook messenger app, use facebook user id to find the user and connect with him. But, The id you got from user profile which api provide for you can not find user. Haven't many trick to get global user facebook id. You can refer more than in topic: http://stackoverflow.com/questions/28892606/get-facebook-user-id-with-facebook-app-scope-id – Sinh Phan Feb 23 '16 at 04:15
  • Remember that This is Trick, and if a trick, i don't sure that you can pass the tester of google – Sinh Phan Feb 23 '16 at 04:28