Facebook Not Showing Correct Post Description in Shared Blog Posts | Alternative Solution



Lately when I shared one of my posts in my facebook account, I thought everything was just all right but when i look at the description of the shared post, the one showing was the about the author text that was shown below my every posts in blogger.

It looked like this:



Facebook not showing correct Post Description | Fix this for Those who are Using Auto Read More Script
Normally the description should be the first paragraph of the post right?. This will greatly support the link and give it a higher possibility of being visited by readers. I started to find solution for this from blogger tutorial blogs but nothing worked for me. Almost all tricks are all the same, maybe for some it worked but for me i'm using auto read more script for my blog i got lost in the tutorials.

The normal way to solve this is to find for this code <data:post.body>  and wrap it with these tags: <p></p>
so it would look like this: 
 <p><data:post.body></p>. Save the template and use the facebook debugger tool to refresh the facebook cache.

It is very easy for those who are not using the auto read more script to find this because there is only one line in the template that look like this.

But if you are using the auto read more you will find many <data:post.body> in your template. What I first did was i edited all the <data:post.body> in my template and added the <p> tags to each of them but it didn't work. 

And i saw that another alternative was edit all your posts' HTML code and add <p></p> to all paragraphs but WTH?. I have almost 100 or even more posts in my blog, meaning I should edit them one by one?, not only that whenever I create a post I should edit the HTML manually. And because I'm a lazy person I always find the shorter solution for my problems.


I started experimenting with the code myself and finally found out the right code and right place for them. I solved it by using the post snippets as meta description.


Take a look at the screenshot, I'm very happy my problem was fixed.



Facebook Not Showing Correct Post Description in Shared Blog Posts | Solution for Those who are Using Auto Read More Script

I will make this short and simple.


1. Open up your template designer, download a backup

2. Check the Expand Widget Templates
3. Find your Auto Read More Script, If you did not put any label or comment for the script you can try to find this code 

<a expr:href='data:post.url'>Read More</a>

This is not the whole auto read more script but it is somewhere at the last part of the script


below that line you should find these three line of codes



</div>
</b:if>
</b:if>

And exactly after the codes above add this following lines:

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:if cond='data:post.snippet'>
<meta expr:content='data:post.snippet' name='description'/>
</b:if>
</b:if>

I found another tutorial that used something like this code but they put it above this line <data:post.body> also, if we follow this we will walk again with our problem with the read more script.

That's it save your template and use the facebook debugger tool to refresh the links to see the results immediately, or you can wait for 24 hours for facebook to refresh it automatically.


I hope this helped for those experiencing also this problem. You can comment for problems below.

Did you like this post? Kindly Share:



ALTECHZONe
About Author
I'm Alison Alimambo, owner and manager of this blog, an online entrepreneur, blogger, graphic artist, and software developer. Connect with me on Google+ and Facebook.
...read more

The design and all the contents of this site are copyrighted and licensed to me. Except for product images, logo and registered names which belong to their rightful owners., If you want to republish it in any website or blog please give proper credits to the original author.

1 comments:

  1. Great blog post, very informative. I think a lot of people will find this very useful.
    simple php shop

    ReplyDelete

Official Fan Page

Add me on Google+