Looking at one of the individual posts: http://apps.facebook.com/themattefinish/2010/12/end-to-end/
And then viewing the frame source for the iframe, I see that you have this as the first content in the body:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: "121351871216273", status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement("script"); e.async = true;
e.src = document.location.protocol +
"//connect.facebook.net/en_US/all.js";
document.getElementById("fb-root").appendChild(e);
}());
</script>
Inside Facebook, the script for the share button actually looks like this:
<a onclick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=End-to-end&p[summary]=%0D%0A+++%0D%0A+++window.fbAsyncInit+%3D+function%28%29+%7B%0D%0A+++FB.init%28%7BappId%3A+%22121351871216273%22%2C+status%3A+true%2C+cookie%3A+true%2C%0D%0A%09%09+xfbml%3A+true%7D%29%3B%0D%0A%09%7D%3B%0D%0A+%28function%28%29+%7B%0D%0A++var+e+%3D+document.createElement%28%22script%22%29%3B+e.async+%3D+true%3B%0D%0A+e.src+%3D+document.location.protocol+%2B%0D%0A+++%22%2F%2Fconnect.facebook.net%2Fen_US%2Fall.js%22%3B%0D%0A+document.getElementById%28%22fb-root%22%29.appendChild%28e%29%3B%0D%0A%7D%28%29%29%3B%0D%0ATaken+from+the+door+of+a+moving+train+on+a+bridge+in+West+Bengal%2C+India.+It+was+scary+%5B...%5D&p[url]=http%3A%2F%2Fapps.facebook.com%2Fthemattefinish%2F2010%2F12%2Fend-to-end%2F','sharer','toolbar=0,status=0,width=626,height=436'); return false;" class="share" title="Send this to friends or post it on your profile.">Share This Post</a></span>
So what we’re grabbing as the “summary” to be shown when people share is the javascript.
We get the summary in WPBook from:
get_the_excerpt()
So something else is putting javascript into your excerpts.
I suppose perhaps we could run that excerpt through a filter to strip javascript and other html tags, like we do when publishing to the wall?
Just checked into SVN code that will fix this by stripping javascript/html out of the excerpt used for the share link – will be in the next release or in development version in the next 30 minutes.
Hi John
Thank you so much for your prompt response. I really appreciate it, given that you are running such a robust app free of cost! 🙂
I realized that the javascript that was coming up when I clicked “Share this post” was coming from a different “Facebook Like” plugin I installed in WordPress. When I moved that to after the description content, I was no longer getting that error I posted above.
However, there was no thumbnail in the Shared Content. Is it because “The Excerpt” does not contain any?
Plugin Contributor
B.
(@bandonrandon)
I belive that is correct, because the_excerpt() dose not contain images Facebook can’t grab images.