在App中打开Facebook页面,而不是浏览器 [英] Open facebook page in App not the browser

查看:361
本文介绍了在App中打开Facebook页面,而不是浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我希望在默认情况下在Facebook应用程序中打开该页面,



这是可能吗?

解决方案

一般来说,可能无法查看此线程:
https://android.stackexchange.com/questions/37549/force-link-to-open-in-app-not-my-default-browser



但是,如果你真的想这样做,你可以遵循与这个URL相同的原则:
从Android应用程序打开Facebook页面



总之,尝试构建一个形式: fb:// profile / pageID 。构建这样的URL的要点是因为在Facebook应用程序中定义的 IntentFilter 。我不知道它是否会工作,但如果没有安装这个应用程序,这可能会失败。



当您点击浏览器中的链接时,应该可以使用。它可能依赖于浏览器。


I have a link to my facebook, on my website, which opens in the phone's browser.

I would like it to open in the facebook app by default, if the app is installed.

Is this possible?

解决方案

In general it may not be possible, check this thread: https://android.stackexchange.com/questions/37549/force-link-to-open-in-app-not-my-default-browser

But if you really want to do it, you can follow the same principle as it is proposed on this URL: Open Facebook page from Android app?

In short, try to build an URL of form: fb://profile/pageID. The point of building such URL is because of IntentFilter defined in Facebook app. I am not sure if it will work, but if there is no Facebook app installed this will probably fail.

That should work when you click on a link in browser. It may depend on a browser though.

这篇关于在App中打开Facebook页面,而不是浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆