android opening facebook app on a specific post

2019-06-19 02:25发布

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条回答
Evening l夕情丶
2楼-- · 2019-06-19 02:39

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
查看更多
登录 后发表回答