开发者

How can I add a link to an iPhone native app from website IF POSSIBLE

I have a link to a Facebook page from a website. I know I can use the URL scheme 开发者_高级运维href="fb://" to open up the Facebook application from within an iPhone, but if the iPhone user does not have the native application installed, an ugly error message pops up. I would rather just send this user to the Facebook website.

There's gotta be a way to do this, but everything I've tried has had some short-coming:

Can't make a HEAD request to a different server

Can't run a try catch javascript function since the event leaves the client page

Can't seem to access information about the user's applications... or can I? I've read a bit about a cookie called "appInstalled" but can't find any real documentation about it.

Any ideas out there? Thanks a ton in advance. Denis


Can a website determine if a device [iPhone] has certain applications installed ? I'm pretty sure that's a big NO because of privacy and security concerns.


Not a really technical answer, but you could change the user interface to give the user an option. For example, having:

Click here if you have the facebook application installed on your iPhone.
If you do not, click here to go through to the site.

Sorry that I cannot offer a "proper" solution, I'm not really that familiar with iPhone development.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜