Reputation: 5403
When a user likes my site, a feed item gets published to the user who liked my site friends' feeds. I'm using XFBML and referencing this page
I would like to, along with the url that gets published, insert a picture and title and subtitle - as I've seen accompanied by other "like posts". Here's my code:
I have some meta tags in the head of the page (note that this page requires that the user is signed in so it's not accessable to any crawlers - I'm not sure if this matters)
%meta{:property => "og:title", :content => "#{@product.brand.heading}'s #{@product.title}"}
%meta{:property => "og:type", :content => "company"}
%meta{:property => "og:url", :content => brand_product_url(@brand, @product)}
%meta{:property => "og:image", :content => @product.picture1.url(:small)}
%meta{:property => "og:site_name", :content => "some name"}
%meta{:property => "fb:app_id", :content => "my app id"}
And then I have what's required by XFMBL:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'my is', appSecret: 'my secrete', status: true, cookie: true,
xfbml: true});
//hide the text of the like button after it loads
$('.connect_widget_button_count_count').hide();
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
And then I have the like button itself:
<fb:like show_faces="false" layout="button_count" width="155"></fb:like>
I would like what's in the meta tags listed above to be in what gets posted by users who like this page. I'd appreciate any help.
Upvotes: 0
Views: 214
Reputation: 5403
I have some meta tags in the head of the page (note that this page requires that the user is signed in so it's not accessable to any crawlers - I'm not sure if this matters)
Yes this does matter, the page containing the meta tags needs to be accessible to facebook. Try http://developers.facebook.com/tools/lint/ to test.
Upvotes: 1