I’m posting this here b/c I had a good deal of trouble finding the solution to this issue.
My goal was to put relevant facebook meta tags in the header of a wordpress theme. Most of this was easy using template and blog_info tags. However, I wanted the image that is displayed when you share a link on facebook to be the author’s gravatar image.
Here’s the solution i came up with:
// I'm only trying to get the gravatar if this is a single post page
// otherwise i'll just use a generic image w/the site logo
if ( is_single() ) {
// credit for this first part: http://markojakic.net/get-author-object-outside-the-loop-in-wordpress
$post_temp = get_post($post_id);
$user_id = $post_temp->post_author;
$authoremail = get_the_author_meta('user_email', $user_id);
// gravatar uses an md5 hash of the email address for the url of the image
// so I need to md5 the author's email
$hImage_md5 = md5($authoremail);
// Construct gravatar URL to retrieve image - ?s=144 is dimension of gravatar I want
$hImage = "http://www.gravatar.com/avatar/". $hImage_md5. ".jpg?s=144";
}
Then, in the meta tags, I can use this $hImage variable as the path to the image.
Great article on Data Driven Design - especially on the heels of #omtrsummit…
Interesting article
If you like photography and tech. you should watch this. #photography #tech #fb
I’d been getting this error on my Curve 8530 for months and just found out how to fix it courtesy of someone here at work. Putting it out here for all to see.
Go to “Options”, then “Advanced Options”, then “Browser” and change the “Default Browser Configuration” to “Internet Browser”.
Fix z-index issues with jQuery. Where was this 2 hours ago? THANK YOU!
this is one of the best things i’ve ever seen.
Dear God, I love this. Turns out we did win the future.
(via Daily What)
Some pretty cool minimal wordpress themes for free download today on @smashingmag