Pinterest has published several methods that website owners can use to provide information for their Rich Pins format, including the standard Open Graph meta tags. Open Graph meta tags generally include the title, description, one or more images, but can also include product details, author information, etc. This past week I found a serious incompatibility between Pinterest’s support of the ‘article:author’ meta tag, and that of Facebook (the leading proponent of the Open Graph standard).
- The Open Graph protocol website describes the ‘article:author’ value as a “profile array – Writers of the article”.
- Facebook describes the ‘article:author’ value as “An array of Facebook profile URLs or IDs of the authors for this article”.
- And Pinterest describes the value as “Article author, all line breaks and HTML tags will be removed”.
Since the Open Graph protocol website often lacks detail and examples, the Facebook developers website is often the next goto for more Open Graph information. As an example, if you have a webpage that is an ‘og:type = article’ and use an ‘article:author’ meta tag, the Open Graph protocol website says the value should be a “profile”, but the “profile” value is described as being another ‘og:type’ (so we might interpret that as being a URL to another webpage of ‘og:type = profile’). Facebook on the other-hand is much clearer — the ‘article:author’ value should be a Facebook profile URL or ID. For example “https://www.facebook.com/john123” or just “john123”. If you enter anything else, like a first and last name, the Facebook debugger will throw an error for that meta tag.
Pinterest on the other-hand will silently ignore any URL in the ‘article:author’ meta tag, and accepts only a character string like “john123” or “John Doe”. The former might be an acceptable compromise, if you don’t mind showing your Facebook username ID on Pinterest Rich Pins. If you prefer to show your full name instead, then your website will have to generate different meta tags for the Pinterest crawler.
To generate different meta tags, you can use the user agent string to identify the Pinterest crawler (and most others), but don’t forget that any full-page caching front-ends (or plugins) will have to be configured to manage the differences. You can either exclude the crawlers from your front-end cache, or use the agent string as part of the content caching ID.
For example, if you use Quick Cache, you can exclude the following user agent string:
Or add the following PHP code to the ‘MD5 Version Salt’ string: