android opening facebook app on a specific post

早过忘川 提交于 2020-01-03 11:01:13

问题


I am working on an application that fetches posts from user stream (from stream table) and displays them.
streams post_id fields are returned in the format of: {uid}_{postid}, e.g.:

100001147753406_320951738012113

How can I open facebook application to show such post?

in web browser this can be done with the url: www.facebook.com/uid/posts/postid, and according to searches this should be accomplished by setting Intent's uri to:

fb://post/{postid}?owner={uid}

However, this does not always work from intent.

What is the correct way to do this?


回答1:


After messing around with the different options, this simple format finally worked for me:

fb://post/{postid}

Where the post id is the entire {x_id}_{y_id} string, e.g.:

fb://post/100001147753406_320951738012113


来源:https://stackoverflow.com/questions/14952266/android-opening-facebook-app-on-a-specific-post

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