I'm building a social media based news site, and for the sharing element to work (Twitter, Facebook etc.), the page's value must reflect it's "headline" (e.g. when the page is shared online, the title should be "Man Bites Dog", not "My News Site").
I've tried multiple PHP and jQuery solutions, but nothing seems to work. There is a complication, though. The site's content is delivered via RSS feed from Blogger, and I'm using jQuery to parse the "headline" RSS and display it on the page. Since the "headline" content is dynamically generated when the page loads, could this cause the problem?
If so, is there a way to use the same RSS-based method to change the value?
Here's the code I'm using to aggregate and display the RSS "headline" feed...
<script type="text/javascript">
jQuery(function($) {
$('#headline').rssfeed('http://cjfoote.blogspot.com/feeds/posts/default?alt=rss', {
limit: 1
});
});
</script>