Facebook pulling wrong url and image

New Member
1 0 1

I am having an issue when I post a particular blog post onto facebook. It is pulling the wrong url and the wrong image as well. The link is : https://yellowhousemarket.com/blogs/news/happy-birthday-yellowhouse. Below is what I have in the theme.liquid section:

 

 <!-- Find Current URL for og:url-->
{% capture current_url %}
{% endcapture %}
<!-- End Find Current URL -->

<!-- Facebook Open Graph -->
{% if template == 'index' %}
  <meta property="og:image" content="https://cdn.shopify.com/s/files/1/1709/4139/files/yhmbfb.jpg?482">
  <meta property="og:image:secure_url" content="https://cdn.shopify.com/s/files/1/1709/4139/files/yhmbfb.jpg?482">
{% elsif template contains 'product' %}
 {% for image in product.images limit:3 %}
 <meta property="og:image" content="http:{{ image.src | product_img_url: 'master' }}">
 <meta property="og:image:secure_url" content="https:{{ image.src | product_img_url: 'master' }}">
 {% endfor %}
{% elsif template == 'article' %}
  <meta property="og:image" content="{{article.image.src | img_url: 'medium'}}">
  <meta property="og:image:secure_url" content="https:{{article.image.src | img_url: 'medium'}}>
{% else %}
  <meta property="og:image" content="https://cdn.shopify.com/s/files/1/1709/4139/files/yhmbfb.jpg?482">
  <meta property="og:image:secure_url" content="https://cdn.shopify.com/s/files/1/1709/4139/files/yhmbfb.jpg?482">
{% endif %}

{% if template contains 'product' %}
 <meta property="og:description" content="{{ product.description | strip_newlines | strip_html | truncate: 300 | escape }}">
{% elsif template contains 'collection' %}
 <meta name="og:description" content="{{ collection.description | strip_html | strip_newlines | escape }}" />
{% elsif template contains 'page' %}
 <meta name="og:description" content="{{ page.content | strip_html | strip_newlines | escape }}" />
{% elsif template == 'index' %}
 <meta name="og:description" content="{{ shop.description | strip_html | strip_newlines | escape}}" />
{% elsif template contains 'article' %}
  <meta name="og:type" content="article" />
{% endif %}

{% if template contains 'product' %}
 <meta name="og:type" content="product" />
 <meta property="og:title" content="{{ product.title | strip_html | escape }}">
 <meta property="og:category" content="{{ product.type }}" />
 <meta property="og:price:amount" content="{{ product.price | money_without_currency | stip_html | escape | remove: ',' }}">
 <meta property="og:price:currency" content="{{ shop.currency }}">
 <meta property="og:availability" content="{% if product.available %}instock{% else %}oos{% endif %}" />
{% else %}
 <meta name="og:property" content="website" />
 <meta property="og:title" content="{{ page_title }}" />
{% endif %}                                                    
<!-- End Facebook Open Graph -->

However when I go to the sharing debugger, this is what it is showing:

 

Fetched URLhttps://yellowhousemarket.com/blogs/news/happy-birthday-yellowhouse
Canonical URL

 

It's pulling the base blog link and the associated image. I want it to pull the fetched url and the associated image with that particular url. Any help would be greatly appreciated. Thank you in advance!

1 Like