0

Recently Apple has unified its affiliate management by providing links with target "itunes_store' of the kind: In Arrivo! HD - Rome's and Milan's buses, taxi and metros, and trip sharing for the conscious visitor to the Ethernal city - Fabrizio Bartolomucci Yet, in order to simplify its management, I would like to call it by means of a meta refresh from a page on my site only I have no hint about how the handle the target thing. The Windows open command just handles standard targets and if I enter 'itunes-store', I get an empty page.

Thanks for your help.

Fabrizio Bartolomucci
  • 4,948
  • 8
  • 43
  • 75
  • Can you provide a precise example? Something like `` ?? – jonaz Aug 21 '13 at 01:40
  • Sure: I thought it got there but it was evidently purged entering it by way of the a references: href="https://itunes.apple.com/it/app/in-arrivo!-hd-i-tempi-di-arrivo/id409812280?mt=8&uo=4&at=11l5Jz" target="itunes_store" – Fabrizio Bartolomucci Aug 22 '13 at 11:56

2 Answers2

0

I'm pretty sure you can't specify a target on a meta refresh, but here is some JavaScript that does what you want. Just place this block somewhere on your page.

<script type="text/javascript">
    var url = "https://itunes.apple.com/it/app/in-arrivo-hd-i-tempi-di-arrivo/id409812280?mt=8&uo=4&at=11l5Jz%22";
    var link = document.createElement('a');
    link.setAttribute('href', url);
    link.setAttribute('target', 'itunes_store');
    link.click();
</script>
jonaz
  • 2,096
  • 1
  • 17
  • 30
  • Glad to help, @FabrizioBartolomucci. If this worked, can you accept and/or vote up? – jonaz Aug 25 '13 at 17:39
  • Sorry again for bothering you, but there is still a minor glitch in the solution. Basically it loads a new page upon entering the page instead of loading it in the same one. This is normally unpleasant as it leaves an empty page behind, but I think it is unacceptable when used in a Facebook frame as it takes the user out of the Facebook page upon clicking the link, and that is of course not what a Facebook user expects. You may view the thing at: [link]https://www.facebook.com/inArrivoIOS[/link] by cliking on the AppStore icon. Thanks again. – Fabrizio Bartolomucci Aug 27 '13 at 08:07
  • I think Apple wants you to make the interstatial click to their store which is why they have those instructions on the [link maker](http://linkmaker.itunes.apple.com/it/). Try changing `https` to `itmss` and see if that works. Since you're gonna be violating Apple's guidelines, you should do a test order to be sure you're getting paid this way. Good luck. – jonaz Aug 27 '13 at 21:21
  • Nope: as you may see at https://www.facebook.com/inArrivoIOS in this way the web page is not even shown, let alone being inserted in the frame as in the previous affiliate system. And what is worst neither solutions work from the iPhone nor iPad, as you may see by connecting to http://www.miafoto.it/refreshIA.html from one of them. And that not even opening the iTunes web page. – Fabrizio Bartolomucci Aug 28 '13 at 20:49
0

Funnily combining your solution with the normal meta refresh does the trick. This is the full code working both on the web, on the iPhone, on Facebook and by the QR code. Great!

<script type="text/javascript">
var url = "itmss://itunes.apple.com/it/app/in-arrivo-hd-i-tempi-di-arrivo/id409812280?mt=8&uo=4&at=11l5Jz%22";
var link = document.createElement('a');
link.setAttribute('href', url);
link.setAttribute('target', 'itunes_store');
link.click();
</script>
<meta http-equiv="refresh" content="0; url=https://itunes.apple.com/us/app/in-arrivo!-hd-romes-milans/id409812280?mt=8&uo=4">
Fabrizio Bartolomucci
  • 4,948
  • 8
  • 43
  • 75