Knowledge Graph Social Media Markup Schema.org

Social Media Markup

Are you looking to markup your webpage to show in the knowledge graph for your social media profiles then read on and we will show you what you need to do.

Here is an example of how it looks for google.

social media structured markup

There are two ways you can do this
1:  You can utilize the microdata format along with the Organization and sameAS property with a data span like this

<span itemscope itemtype=“https://schema.org/Organization”>
<link itemprop=“url”href=“http://www.your-company-site.com”>
<a itemprop=“sameAs”href=“https://www.facebook.com/your-company”>FB</a>
<a itemprop=“sameAs”href=“https://www.twitter.com/YourCompany”>Twitter</a>
</span>

2:  Alternatively you can do it by using the JSON-LD version in your website, you can specify this with the Organization and sameAS property like so

<script type=“application/ld+json”>
{“@context”:“http://schema.org”,
“@type”:“Organization”,
“name”:“Your Organization Name”,
“url”:“http://www.your-site.com”,
“sameAs”:[“http://www.facebook.com/your-profile”,
“https://www.twitter.com/yourProfile”,
“https://plus.google.com/your_profile”]
}
</script>

When you are happy you have this set correctly ensure you go to Google’s Structured Data Testing Tool and test it is right.  Within google testing tool what you need to do is the following.

Structured data testing tool instructions

Step 1:  Click the link where it says Fetch URL.
Step 2:  Enter the URL you wish to test.
Step 3:  Click fetch and validate button.
Step 4:  In the right hand side box you should get the All Good highlighted in Green with a little green tick next to it. If there is an error with the markup it will be highlighted.

Step 5:  From within the box you should be able to expand the Organization markup element and see your social media markup.

Step 6:  Alternatively you can click above the box where it says Results – “Filter by use case” with the little drop down arrow to the right hand side of the link.  Click the drop down arrow and filter by “Social Profile Links”  You will then be able to see your social media structured markup.  Depending on how many social media profiles you specify you should see something like the following:

url: http://www.your-site.com
sameAs: https://www.facebook.com/your-profile
sameAs: https://twitter.com/yourProfile
sameAs: https://plus.google.com/+your-profile/posts

Why would you want your social media profile in the knowledge graph, well the simple answer is it enables you to be seen more visually for a start but it also allows people to find your social media profiles and recognise your brand name on the web with a few simple changes.

If you have any questions around this post we will be happy to assist and look forward to hearing your feedback.