Lizozom
Lizozom

Reputation: 2311

How to redirect from Facebook browser to Android market?

In my site, there is a link that once clicked, goes through a series of redirect that eventually should go to the app market.

The final redirect URL is something like:

market://details?id=APP-IDENTIFIER

And it is started by calling:

window.open(url,"_blank")

On Android, when clicking in a regular browser - all works well. When opening the page in the facebook browser, the redirect fails with the following message:

The webpage could not be loaded as" net::ERR_UNKNOWN_URL_SCHEME

I am aware that any app may block custom scheme access, but is there a way to overcome this?

Upvotes: 2

Views: 4247

Answers (2)

Budius
Budius

Reputation: 39836

don't user the market:// identifier, but the actual play store link https://play.google.com/store/apps/details?id=<APP-ID>

  • if the app is not blocking, the Play Store will open with no issues
  • if the app is blocking launching of apps, at least you'll show the Play Store page.

Upvotes: 2

Lizozom
Lizozom

Reputation: 2311

It seems that the problem is oddly solved by starting the redirect chain by calling:

window.open(url,"_top")

instead of *_blank.

Upvotes: 2

Related Questions