Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i put both og:image:secure_url and og:image on page for linkedin and facebook

my website is currently running on HTTPS://. i am leveraging add this for social functionality.

Problem: i face following problems on linkedin sharing.

a) Most of time only half of the image comes b) Some time image does not appear.

Questions:

1) Can i put both og:image:secure_url and og:image on page for linkedin and facebook. if Yes, what should be the order. Example:

<meta property="og:image" content="http://example.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />

2) Do following are mandatory for linked in and facebook to show images properly.

<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />

any solution, but it should work on both linkedin and facebook.

like image 904
Techmaster Avatar asked Aug 29 '12 12:08

Techmaster


People also ask

What is OG image Secure_url?

og:image:secure_url - An alternate url to use if the webpage requires HTTPS. og:image:type - A MIME type for this image. og:image:width - The number of pixels wide.

What are OG tags used for?

Open Graph meta tags are snippets of code that control how URLs are displayed when shared on social media. They're part of Facebook's Open Graph protocol and are also used by other social media sites, including LinkedIn and Twitter (if Twitter Cards are absent). You can find them in the <head> section of a webpage.

What are OG images?

An open graph image or OG image is the image that appears when you post website or video content to your social accounts. It is part of an important group of meta tags that influence the performance of your content link on social media like Facebook, Linkedin, Pinterest and Twitter.

What does the OG image property should be explicitly provided even if a value can be inferred from other tags?

Inferred Property The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags. If you do not have the Open Graph tags specified, then Facebook will only fill in the gaps for the image, title, and description.


2 Answers

1) Yes, and based on http://ogp.me/#structured, this will tell the crawling service that "the webpage requires HTTPS".

2) These are not required, as FB and LinkedIn will form the correct size regardless. Remember that LinkedIn explicitly has minimum requirements whereas FB does not.

like image 145
bobjones Avatar answered Oct 16 '22 02:10

bobjones


Here's what I discovered recently with these tags and the latest open graph protocol (June 2019).

  1. You have to include the full URL (relative paths don't work)
  2. Use og:image (not og:image:secure_url)
  3. og:image currently supports secure (https) for the content value
  4. You can rescrape the website and test the functionality with the Facebook sharing debugger

Hope it helps as I find the documentation hard to follow with these specific details.

like image 12
joshmedeski Avatar answered Oct 16 '22 02:10

joshmedeski