Meta "apple-itunes-app" doesn't work - ios

I've written an html page with the Apple meta to link at my app in the App Store:
<meta name="apple-itunes-app" content="app-id=MY_APP_ID" app-argument="myschema:http://example.com">
The documentation
(https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html)
says that with "app-argument" the app fires application:openURL:sourceApplication:annotation: method and pass as url the app-argument.
The method doesn't been called.
The documentation of the methods say to use new method application:openURL:options:, nothing change.
I read in other answer that this meta works only with the release app version (so isn't debuggable), so I put an hidden file log in the app and log at first line of method to be sure that the problem isn't my code in the method.
I tried in with ios11 and ios11.1
Any suggestion?

The documentation link you included specifically shows "app-argument" should be part of the value given to the content attribute and not an attribute itself. Notice where the quotation marks are:
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">

Related

Google SDTT appending "#__sid=md3" to URL for mainEntityOfPage

Why is this happening?
HTML shows:
<meta content='http://www.costumingdiary.com/2015/05/freddie-mercury-robe-francaise.html' itemprop='mainEntityOfPage' itemscope='itemscope'/>
Structured Data Testing Tool output shows:
http://www.costumingdiary.com/2015/05/freddie-mercury-robe-francaise.html#__sid=md3
Update: It looks like it has to do with my breadcrumb list. But still, why is it happening, and is it wrong?
If the URL you want to provide is unique you can use the itemid property.
I was confronted with mainEntityOfPage by the tool after the latest update. And using Google's example I used the following code
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://blog.hompus.nl/2015/12/04/json-on-a-diet-how-to-shrink-your-dtos-part-2-skip-empty-collections/" />
And this show up correctly in the Structured Data Testing Tool results for my blog
I don’t know where the fragment #__sid=md3 is coming from, but as the SDTT had some quirks with BreadcrumbList in the past, it might also be a side effect of this.
But note that if you want to provide a URL as value for the mainEntityOfPage property, you must use a link element instead of a meta element:
<link itemprop="mainEntityOfPage" href="http://www.costumingdiary.com/2015/05/freddie-mercury-robe-francaise.html" />
(See examples for Microdata markup that creates an item value, instead of a URL value, for mainEntityOfPage.)

Segment.io `analytics.page` not sending to Google Analytics in Rails

I'm following Segment's quickstart guide at: https://segment.com/docs/libraries/analytics.js/quickstart/
Basically, Google Analytics is not receiving any page views from Segment and I can't figure out why...
In my layouts/application file, I have:
:javascript
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.1.0";
analytics.load('#{ENV["SEGMENT_WRITE_KEY"]}');
analytics.page();
}}();
Other notes:
It is properly pulling in my write key environment variable
The integration is set up on my Segment dashboard (enabled, with the correct website tracking id supplied)
The analytics.load integration seems to be working because, in my debugger console, analytics.Integrations["Google Analytics"] is properly initialized
Page views are showing up in the Segment dashboard's Debugger page (with the path, title, etc default properties all set), but views are not being transmitted to Google Analytics.
I don't believe it's because any arguments are missing, because Google's pageview only requires either a page or location property, both of which are supplied by default through Segment's page() method.
As it turns out, we had another script that was loading the same google analytics javascript file. I have no idea why having a duplicate script tag created the issue, but there it is. Removing the duplicate fixed the problem.
<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>
<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>

Inconsistent results trying to parse og:image tag from a webpage manually and programmatically

I first manually browse to the below URL:
Mounting injuries won't stop Germany's path to World Cup
Then if view the page source and look for og:image meta tags I find the following:
<meta property="og:image" content="http://l.yimg.com/bt/api/res/1.2/JjwtkhIEdT9nKxLp8p0LFQ--/YXBwaWQ9eW5ld3M7cT04NTt3PTYwMA--/http://media.zenfs.com/en_us/News/Reuters/2013-10-08T122032Z_1_CBRE9970YAZ00_RTROPTP_2_SOCCER-WORLD.JPG"/>
However, if I try to parse the same url programmatically, I get a generic Yahoo stock icon. Here is the code that I am using:
string url = "http://sports.yahoo.com/news/mounting-injuries-wont-stop-germanys-path-world-cup-122032650--sow.html";
WebClient wc = new WebClient();
var doc = new HtmlAgilityPack.HtmlDocument();
string newsPageSource = wc.DownloadString(sourceUri.ToString());
doc.LoadHtml(newsPageSource);
...
(I have removed the rest fro brevity).
If I debug here and inspect the newsPageSource string that contains the content of the target web page and look for og:image tag, its contents are different:
<meta property="og:image" content="http://l.yimg.com/bt/api/res/1.2/81I5U991YW6EEaB2Cjd58g--/YXBwaWQ9eW5ld3M7cT04NTt3PTYwMA--/http://l.yimg.com/os/mit/media/m/social/images/social_default_logo-1481777.png"/>
So not sure what is going on here. I guess, when browsing manually, the original URL is probably redirecting to some other internal URL but when doing this programmatically, the code just grabs the first "snapshot" of page source, without waiting a bit longer and executing any redirects. Can anyone shed light here? Or better yet, how would I extract the real image (2013-10-08T122032Z_1_CBRE9970YAZ00_RTROPTP_2_SOCCER-WORLD.JPG) in this case instead of getting a Yahoo stock icon (social_default_logo-1481777.png).
Somehow Facebook and Google+ are smart enough to extract the correct image when I paste the same link.
Thanks,
Archil

W3C validator shows new error: "Meta requires 'name' attribute"

The w3C validator was all fine with this code:
<meta property="og:site_name" content="--Sitename--" />
If I replace the property attribute with name, the validator says og:site_name is not registered.
All of a sudden today it displayed this error:
Error Line 7, Column 66: Element meta is missing required attribute name.
Nothing is changed but this error popped up.
Anyone knows why, and the solution for that?
For HTML5
If a meta element has the property attribute (from RDFa), the name attribute is not required.
See the section "Extensions to the HTML5 Syntax" from the W3C Recommendation HTML+RDFa 1.1 - Second Edition:
If the RDFa #property attribute is present on the meta element, neither the #name, #http-equiv, nor #charset attributes are required and the #content attribute MUST be specified.
So your markup is fine:
<meta property="og:site_name" content="--Sitename--" />
But it’s (now) even valid if you use the name attribute instead of RDFa’s property, because the OGP values are registered. So this is fine, too:
<meta name="og:site_name" content="--Sitename--" />
And you could even combine both ways:
<meta name="og:site_name" property="og:site_name" content="--Sitename--" />
It's hard to get what validator and in what mode you're using. Suppose it's validator.w3.org. Than notice that HTML5 support there is "experimental". And "property" tags refer to rdfa which is part of HTML5 standard. To dive in further details one need your code snippet or page url...
I had the same problem which I find really borring.
This might not be the answer you were waiting for but I recommend using http://validator.nu/ instead of W3C validator.

Understanding og:url

I am working through the Facebook tutorial for iOS and am having trouble when a get to the final part with Publish Open Graph Story. I have gone through and set everything up as best I understand. When I try to test using the Object Debugger I get "Missing Required Property: The 'og:url' property is required, but not present." Can some one help me and explain this tag and how it should be set?
Thanks for the help.
Have a look at ogp.me they define og:url as :
og:url - The canonical URL of your object that will be used as its
permanent ID in the graph, e.g.,
"http://www.imdb.com/title/tt0117500/".
Basically as jeff sherlock of facebook explains in this post: https://stackoverflow.com/a/7831012/228741
That when you give the url of your action (the one containing meta tags) facebook ignores everything that is on that page (doesn't render it) . But it renders whatever you have given in the og:url.
What i do usually is have my og:url call the same page with the parameters. So facebook renders the same page for me. If you want to render some other page you give the link in the og:url.
This is set as a meta tag in the <head> section.
Example :
<meta property="og:url" content="your url">

Resources