Schema.org clarification for JSON-LD representation and URIs - uri

I'm trying to encode in JSON-LD the semantic information related to a website using Schema.org.
The web site is very basic: it contains the home page, a gallery page with a list of images and the image detail page.
Reading the different examples from the Schema.org website, and having a look also at the "get started" section, it is not so easy to understand which information have to be provided in each page.
To clarify the question, I can provide a snippet of code that I'm trying to create, by deducing the needed information after reading the Schema.org documentation.
Below the list of specific questions:
Does the information provided in the home page need to be repeated in all of the other pages? In this case, how the additional information shall be encoded (how to state that the page is a ImageGallery or ImageObject)?
How to match (in the image detail page) the image with a URI to semantically link the thing in the image to a real world thing (using for example a dbpedia.org/resource/URI)?
Example
HOME PAGE
{ "#context":"http://schema.org",
"#type":"WebSite",
"name":"Site name abc",
"alternateName":"ABC",
"description":"description",
"keywords":"keywords",
"inLanguage":"en",
"url":"http://www.thewebsiteurl.com",
"potentialAction":{
"#type":"SearchAction",
"target":"http://www.thewebsiteurl.com/find/{search_term_string}",
"query-input":"required name=search_term_string"
}
}
GALLERY PAGE
{ "#context":"http://schema.org",
"#type":"ImageGallery",
"description":"description",
"keywords":"keywords",
"associatedMedia":[
{
"#type":"ImageObject",
"contentUrl": "http://...../image1URL.jpg",
},
{
"#type":"ImageObject",
"contentUrl": "http://...../image2URL.jpg",
},
.....
]
}
IMAGE DETAIL PAGE
{
"#context": "http://schema.org",
"#type": "ImageObject",
"author":{
"#type": "Person",
"name":"abc"
},
"contentLocation":{
"#type": "Place",
"geo": {
"#type": "GeoCoordinates",
"latitude": "[latitude]",
"longitude": "[longitude]"
},
"name": "Place name"
},
"copyrightHolder":{
"#type": "Organization",
"email": "info#example.mail",
"url" : "http://www.thewebsiteurl.com"
},
"contentUrl": "http://...../image1URL.jpg",
"datePublished": "[date]",
"description": "description",
"keywords":"keywords",
"name": "Image name",
"exifData":[
{
"#type": "PropertyValue",
"name": "Exposure Time",
"value": "1/10 sec."
},
.....
]
}

Does the information provided in the home page need to be repeated in all of the other pages?
With the syntaxes Microdata and RDFa, you would typically mark up what is available on a page. While the syntax JSON-LD is different from them (because it’s not marking up, i.e., it’s decoupled from the existing markup), there is no reason to handle it differently.
If you have content about a certain image on the homepage, the gallery page, and the detail page, you may (and, in my opinion, should) provide structured data about it on each of these pages.
One reason for this is that consumers don’t necessarily parse your whole site:
A consumer might find a single page, look for structured data, and is gone again without looking for another page of your website.
A consumer might find a single page, look for structured data, is interested in more data and follows links specified in your structured data (e.g., URIs given as property values).
So ideally provide structured data (or reference structured data which is provided elsewhere on your site) wherever it’s relevant.
In this case, how the additional information shall be encoded (how to state that the page is a ImageGallery or ImageObject)?
It can make sense to differentiate between the type for the document (in the case of web page, WebPage or one of its subtypes) and the type(s) for the thing(s) described in this document.
So ImageGallery (which is a subtype of WebPage) represents the page, and ImageObject represents an image that could be part of this page.
If possible (but it often isn’t), you should provide properties that put all provided nodes in relation. For example with hasPart/isPartOf, mainEntity/mainEntityOfPage, or of course properties like author etc.
How to match (in the image detail page) the image with a URI to semantically link the thing in the image to a real world thing (using for example a dbpedia.org/resource/URI)?
Schema.org’s sameAs property could be used for this purpose. But you could of course also use properties from other vocabularies, like owl:sameAs.

Related

LinkedIn Share API not showing image for URL some of the time

Our application lets an admin create a suggested social post for all of the members of his or her organization. The admin will insert a URL in our system and our platform creates a unique URL for each member. This is a link with a 302 redirect to the original link. It works similar to Bit.ly. When the member gets the suggested post he/she can create his/her own content for the post and url and approve for posting via the LinkedIn API. That all works perfectly.
As an example the share url could be https://example.com
Member one gets: https://yip.sh/1234
Member two gets: https://yip.sh/4321
Member three gets: https://yip.sh/4444
The PROBLEM: Some (a minority) of the member's posts do not share the meta image for the url. The majority of the social posts work and show a meta image so that tells me both the 302 redirect and the destination url are working correctly. I also have tried the urls from the post that do not work in the LinkedIn post inspector and the meta image shows up there.
My ASSUMPTION: Sometimes pulling the meta image takes a little longer than LinkedIn wants to wait and since each URL is unique it needs to check each time.
Possible SOLUTION: Automated ping of Linkedin post inspector to cache image before the share. This was what we did with Facebook when we had a similar problem. I have not found a way to do that though with LinkedIn.
Just to show the code we are using to share the post. But as I mentioned above this is working a majority of the time.
pass_the_hash = {
"author": "urn:li:person:#{#social_identity.uid}",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "My Comment"
},
"shareMediaCategory": "ARTICLE",
"status" => "READY",
"originalUrl" => "https://yip.sh/1234"
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
Has anyone seen a similar issue with LinkedIn Share API not showing meta image consistently? Or possibly know of a way to automate usage of the post inspector?
To quote LinkedIn...
After updating your website with perfect preview content and image, if you try sharing your website link you will still see old preview content and image. That's because LinkedIn caches link preview content for 7 days. Source: Official LinkedIn Documentation.
As you and they state, you can use the LinkedIn Post Inspector to refresh the cache. If you wanted to go the approach of pinging/curling LinkedIn, you can do...
https://www.linkedin.com/sharing/share-offsite/?url={yourlURL}
For instance, seems to work for getting info from the LinkedIn share API for GitHub.
Of course, you do also have the less-desirable option of waiting 7 days, although it is nice to know that it eventually works itself out by itself.
In the ugcPosts endpoint of LinkedIn shares API, there are some changes that are causing these issues. You will need to make changes to your code and add extra key for thumbnails like below:
{
"author": "'.$ownerURN.$page_id.'",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "'.$text.'"
},
"shareMediaCategory": "ARTICLE",
"media": [
{
"status": "READY",
"description": {
"text": "'.$linkDescription.'"
},
"originalUrl": "'.$href.'",
"title": {
"text": "'.$linkTitle.'"
},
"thumbnails": [{
"url": "'.$imageHref.'"
}]
}
]
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
I hope this is useful to people who are facing issues with the linkedIn Shares API now. I know this question is old but we faced this issue for a few days and the API documentation is not pointing out the issues.

How to add a URL or Zoom Meeting ID to Google Calendar via API

I am writing a complex integration between Zoom and Google calendar - I can't really use their out of the box solutions. I have the Google Calendar API working fine (CRUD) but I don't see a way to add a Zoom meeting ID or a top level link via the API. It appears the Google Calendar product provides a place for Zoom meeting information - I just cannot see how to create it.
Looks like using event.description is the only way to do this - inline links. The other top level methods pertain to google products, like hangouts, only.
It's an old question, but for everyone looking for something similar you can do it using the conferenceData param.
The minimal working example is something like this:
conferenceData: {
conferenceSolution: {
key: { type: "addOn" },
name: "Zoom",
},
entryPoints: [
{
entryPointType: "video",
passcode: "4gnZXJ",
uri: "https://zoom.us/j/93831668388?pwd=UHRqU0VwMjF3d1B0VXU5bFBRYWIxdz09",
},
],
}
Keep in mind that you need to send the conferenceDataVersion query param with the value of 1 in order to take the conferenceData Docs

WP REST attachment

How do I attach images and videos on my post via WP REST API?
I was trying via /wp-json/wp/v2/posts/3372/meta including form-data key and value (images) but returns the following
{
"code": "rest_forbidden",
"message": "Sorry, you cannot view this post.",
"data": {
"status": 401
}
}
WPAPI Official has a good article about this.
You need to do the following two steps.
Upload media via REST API. This is done in a POST request, for more info, see this answer .
If you wish to set the uploaded media as featured image, include the media id in featured_media field in your POST request, see this doc.
If you wish to attach image in to content of a post, then you'll need to create an image tag in content html. Like
<img src="linkToUploadedMedia">

How to properly remove script i found that is causing 2 products to show in structured data - woocommerce

We are having an issue where our structured data is showing 2 products instead of one on each product page. I located the script adding the extra info - however the script was found on each individual product page and we have loads of products for woo commerce. So like 1000+ pages. Is there a setting inside WordPress to remove this schema code?
I located the schema code searching our site files using Sublime. I could remove it but i feel like that would be the wrong way to do it? Since that same script is located on ALL our product pages. Is it a setting in wordpress? I am kind of lost.
This is the schema script I am trying to remove.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Organization",
"name": "vapesocietysupply",
"url": "https://vapesocietysupplies.com",
"logo": "https://cdn.vapesocietysupplies.com/wp-content/uploads/2016/11/vss-logo-sharp.png",
"contactPoint": [
{
"#type": "ContactPoint",
"telephone": "+1-888-978-8507",
"contactType": "customer service"
}
]
}
</script>
Thanks for any help in the right direction!
Structured data analysis: https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fvapesocietysupplies.com%2Fproducts%2Fglazed-donut-by-loaded-e-liquid-120ml%2F

How do I customize an HTML template before sending it in an email using Meteor and Mandrill?

I'm setting up an HTML template (not meteor template, but just a template written in HTML) and I need to plug in values for each donation received on our donation page. I will then submit that HTML file to Mandrill and it will send the file out to their email address. I don't know how to get started here. I just need a push in the right direction, or a resource to look for.
The question I have is, how do I add values into a static HTML file, then give that file to the Mandrill app without creating a new HTML file each time a receipt is sent and without changing the original file?
Thanks
Look like I just needed to paste in the merge tag fields that I want to use, then reference them when I do my API call.
http://help.mandrill.com/entries/21678522-How-do-I-use-merge-tags-to-add-dynamic-content-
So the template can have text like this, with the mergetag surrounded by *|...|*
Dear *|FNAME|*,
Then in the API call just tell Mandrill what fname should be replaced with.
```
"merge_vars": [
{
"rcpt": "emailadress#domain.com",
"vars": [
{
"name": "fname",
"content": "John"
},
```

Resources