/ Published in: HTML
If you are using Simple Facebook Connect Wordpress plugin, it is better to add this code after changing the og:image value or deleting it. Using this code in your Wordpress Theme header will result in having more meaningful information shown in Facebook profile for anyone clicking the button.
Not having this code will result in having every and any liked article show as the same in the visitors Facebook profile. For example, if a visitor likes 4 different articles they will show the same info on his Facebook profile, which is really useless and repititive.
Not having this code will result in having every and any liked article show as the same in the visitors Facebook profile. For example, if a visitor likes 4 different articles they will show the same info on his Facebook profile, which is really useless and repititive.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<meta property="og:title" content="<?php the_title(); ?>"/> <meta property="og:site_name" content="<?php bloginfo('name'); ?>"/> <meta property="og:image" content="URL to Post Thumbnail if you are using custom field or remove the line"/> If you are using a custom-field for posts thumbnails, you may use this (change the name of the custom field, in this case being thumbnail): <meta property="og:image" content="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>"/>
URL: http://blogs.warwick.ac.uk/ahariri/entry/facebook_like_button/