Need a specified image to automatically show when posting to Facebook. | Community
Skip to main content
November 11, 2014
Solved

Need a specified image to automatically show when posting to Facebook.

  • November 11, 2014
  • 5 replies
  • 2112 views
I want an image to show up autoamtically when I share a Marketo landing page on Facebook. This image does not need to show up on the landing page itself, just on Facebook when I'm posting. Sometimes, if we are using an image on the landing page with the right dims, it will autoamotically show up on Facebook, but there must be a way to choose which image should show up. Those who are familiar with Facebook will know that there isnt' a way like other channels to upload a pic to corrsepond with the post, so it must be done in the page's meta data somehow. 

In the past, I've just uploaded an image to Facebook and added the link to the landing page in the iamge description, but this is not ideal. 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by
Add this to your Marketo landing page. Change http://example.com/example.jpg to the link of the image. 
<meta property="og:image" content="http://example.com/example.jpg"/>

Instructions here on how to add this tag to Marketo landing page:
http://developers.marketo.com/blog/integrate-optimizely-with-a-marketo-landing-page/
 

5 replies

Accepted solution
November 11, 2014
Add this to your Marketo landing page. Change http://example.com/example.jpg to the link of the image. 
<meta property="og:image" content="http://example.com/example.jpg"/>

Instructions here on how to add this tag to Marketo landing page:
http://developers.marketo.com/blog/integrate-optimizely-with-a-marketo-landing-page/
 
November 17, 2014
For future viewers of this thread, I added a post about this on the Marketo developer blog:
http://developers.marketo.com/blog/specify-an-image-when-a-marketo-landing-page-is-shared-on-facebook/
November 20, 2014
Murtza, do you have any documentation or advice to troubleshoot this process? We're finding that on our landing pages Open Graph doesn't always pull in the property meta tags we specify.  For instance, on some of our pages, it doesn't appear to insert the meta tags in the header at all, and continues to pull in the generic page title <Title> from the template rather than using the <meta property="og:title" content="Name of Content"/> we specify. 

We've also found that when we give the landing page a new URL, the meta tags get treated by Open Graph as a 301 redirect to our main resource center page and no longer shows the correct page properties. 
November 20, 2014
I would recommend trying to put the same tag in the Custom Head HTML. Let me know if that solves the problem?
November 20, 2014
Hey Murtza,  putting them in the Custom Head HTML didn't work. We ended up having to add them direcly to the header section of the Landing Page Template itself using tokens.

That solved it, before doing that we we're seeing that even with our meta property values such as "og:title" and "og:image" specificed in the meta of the LP, the Add This would still default to pulling in the <Title> of the landing page rather than what we specificed, and would pull in a random picture from the site.