Creating a GeoPoint complex data type in Facebook Open Graph - facebook

I am attempting to create a GeoPoint type to my existing Object. Facebook's documentation here isn't exactly stellar - but what I went ahead and did was create a new property and named it location. I made it of type GeoPoint and required.
I then supply the following in my template:
<meta property="my-app:location:latitude" content="<%= #location.lat %>" />
<meta property="my-app:location:longitude" content="<%= #location.lng %>" />
Yet the debugger complains:
The parser's result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched. Here are the input property =>content pairs that were not seen in the parsed result: 'my-app:location:latitude => 40.134537901957735, my-app:location:longitude => -75.00853989318185'
How am I supposed to define this GeoPoint and how am I supposed to embed the lat/lng in my URL? This does not want to validate it any way I've tried.

I just ran the URL of an object I published via another app (Endomondo), but which contains GeoPoint data into the debug tool, and this is how they did it. Bear in mind it's an array in this case (it's a path for a cycle activity) so there were actually like 60 of these, but i think a single example would just be:
Meta Tag <meta property="endoapp:route:latitude" content="3x.xxxx" />
Meta Tag <meta property="endoapp:route:longitude" content="-12x.xxxx" />
Meta Tag <meta property="endoapp:route:altitude" content="0.01" />
Looking at your example, I think maybe the omitted altitude could be the problem?
Endomondo's example uses an array of points in the 'route' field, and one each for start and finish, which are endoapp:start:latitude, endoapp:start:longitude, etc

You should omit what you specified at
property="og:type", i.e. content="my-app"
if so then you should use property="location:latitude" etc (omit "my-app" prefix)

Related

Can value in PropertyValue be an array? [duplicate]

A Schema.org object of type Person can have a sameAs property of type URL. According to Google's structured data site, the sameAs property can be a single item or an array.
The docs on Schema.org do not mention whether sameAs can be a single item or an array. Is this just Google deviating from Schema.org? Or is it the case that all properties in Schema.org can be single items or arrays?
Every Schema.org property can have multiple values. It doesn’t necessarily make sense for some properties (e.g., birthDate), but it’s still allowed.
In JSON-LD:
"sameAs": ["/foo", "/bar"],
In Microdata:
<link itemprop="sameAs" href="/foo" />
<link itemprop="sameAs" href="/bar" />
In RDFa:
<link property="sameAs" href="/foo" />
<link property="sameAs" href="/bar" />
This doesn’t necessarily mean that Google (or any other consumer) supports this for every property, too. So when Google explicitly mentions this in their documentation, you can be sure that the respective search result feature works with multiple values.

How to define multiple dietary restrictions in suitableForDiet field? [duplicate]

A Schema.org object of type Person can have a sameAs property of type URL. According to Google's structured data site, the sameAs property can be a single item or an array.
The docs on Schema.org do not mention whether sameAs can be a single item or an array. Is this just Google deviating from Schema.org? Or is it the case that all properties in Schema.org can be single items or arrays?
Every Schema.org property can have multiple values. It doesn’t necessarily make sense for some properties (e.g., birthDate), but it’s still allowed.
In JSON-LD:
"sameAs": ["/foo", "/bar"],
In Microdata:
<link itemprop="sameAs" href="/foo" />
<link itemprop="sameAs" href="/bar" />
In RDFa:
<link property="sameAs" href="/foo" />
<link property="sameAs" href="/bar" />
This doesn’t necessarily mean that Google (or any other consumer) supports this for every property, too. So when Google explicitly mentions this in their documentation, you can be sure that the respective search result feature works with multiple values.

Proper way to use the 'publisher' property ("The attribute publisher.itemtype has an invalid value.")

When I attempt to validate my structured data using Google's Structured Data Testing tool, I get an error:
The attribute publisher.itemtype has an invalid value.
I am getting that on this line:
<meta itemprop="publisher" content="My Real Name Here" />
How do I provide a valid value for this property?
The expected value of the publisher property is another item (Organization or Person).
While Schema.org always allows to provide a string value (like you do), Google might require a certain value type for one of their search features (e.g., an Organization value for their Articles rich result for AMP HTML pages). If you don’t care about (or can’t qualify for) this feature, you can ignore the error in the SDTT.
The problems with using a string value: it’s not clear if the publisher is a person or an organization, and it’s not possible to provide additional data about the publisher.
If you want to provide an item, it could look like:
<div itemprop="publisher" itemscope itemtype="http://schema.org/Person">
<p itemprop="name">NewGuy</p>
</div>
<div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<p itemprop="name">NewGuy Inc.</p>
</div>

Microdata error: "The property http://xmlns.com/foaf/0.1/name is not recognized by Google"

The way I understand it, the Schema.org type called Product inherits from the type Thing. So why does this:
<meta itemscope="" itemtype="http://schema.org/Product" itemid="https://some.url" itemref="md25" />
<div class="field-item even" itemprop="description http://xmlns.com/foaf/0.1/description">
long description goes here
</div>
<meta itemprop="name http://xmlns.com/foaf/0.1/name" content="Blueair Pro L" id="md25" />
… fail, when I enter it in Google's testing tool?
I get error:
The property http://xmlns.com/foaf/0.1/name is not recognized by Google for an object of type Product.
But description is part of Thing and Product inherits from it. It even shows it on the Schema.org page here.
So why is this error being thrown?
The quoted message is about the property http://xmlns.com/foaf/0.1/name, not about the property http://schema.org/name or http://schema.org/description.
And it doesn’t say that it would be an error (in Microdata, it is valid to use absolute URLs as properties), it just says that Google doesn’t recognize it. Which is not surprising, because Google doesn’t document support for the FOAF vocabulary.
On a side note: You can’t use the meta with itemscope like that. You should use a div (or a more specific) element instead.

Error trying to publish a built-in read action

I've been trying to publish a read action for an article object to timeline, but I can't get past this error:
Message (#3502) Object at url...has og:type of 'website'. The property 'article' requires an object of og:type 'article'. Now I am confident my meta tags are correct and the og:type is 'article', not 'website'.
Here is the link to the article http://fb.idebate.eu/article2.php.
Any help at all would be greatly apreciated.
When testing your article against the Facebook Open Graph Debugger it returned the following error:
Parser Mismatched Metadata:
The parser's result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched.
In your page, you've defined the article description twice:
<meta property="og:description" content="A Farewell To Arms" />
<meta property="og:description" content="quote" />
Try removing one of the descriptions, and see if that resolves your problem.