Search code examples
facebookfacebook-graph-apifacebook-opengraphfacebook-sharer

Can a default-only image be set by Facebook OpenGraph?


I know of the OpenGraph "og:image" meta tag that can be used on the site however when I specify the image on the page it shows up as the ONLY image. I have tried a few different changes and nothing has worked so far.

Is there a way to specify an image through Facebook's OpenGraph (or not) that will be used as a first image but still include the other auto-selected images after? I do not currently have the ability to dynamically pull all required images into the header of the page. Specifying an "og:image" in the header of all the pages causes ONLY that one image to appear as the image when you share any of the urls.

For instance, we have a logo that we want to use at the default (first) image when someone shares any link under domain somespecifieddomain.com. After placing the "og:image" tag in the header the other automatically selected images disappear and only the specifed imaage is available to select. This occurs for all paths as well so somespecificdomain.com/path/to/somewhere also uses that same ONE image that was specified. Can it be used as the first and still include the automatically pulled images as selectable image 2, 3, 4, etc.?


Solution

  • You can specify multiple og:image tags for a page. The user then gets the ability to choose which of the images display when they share a post.

    See the Open Graph Protocol Array documentation