Is it impossible now to open Facebook Messenger chathead of friends from my app?

放肆的年华 提交于 2019-12-02 15:05:29

问题


I'm retrieving user's Facebook id using AccessToken.getCurrentAccessToken.getUserId() and saving it in FirebaseDatabase.

Then I'm retrieving it and populating several CardViews using the data. Each card gets an ID and there's a button on card which when pressed should open the Facebook Messenger chathead associated with that ID.

I tried opening the chathead using this code:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb-messenger://user/"+fbID));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);

Though it is opening the chathead but not of the user whose ID was associated with that card. It opens the chathead for some anonymous Facebook User.

I searched internet and find out that now Facebook allows to have a different id which is called app scoped user id. When I tried to get the id from https://findmyfbid.com, I got the original ID.

The problem is that with the app scoped user id, we can't open the specific chathead anymore but with the ID fetched from findmyfbid.com, the chathead for that specific user gets opened.

So, is it completely impossible now to open chathead of various users or is there any other way to do this.

Please let me know if there is another way to send message to that user using his/her Facebook ID.

来源:https://stackoverflow.com/questions/46841489/is-it-impossible-now-to-open-facebook-messenger-chathead-of-friends-from-my-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!