I made use of this code prior to the during my wordpress theme

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" <?php language_attributes(); ?>>
<?php if (have_posts()):while(have_posts()):the_post();endwhile;endif;?>
<!-- Facebook Opengraph -->
    <meta property="fb:app_id" content="my_app_id" />
    <meta property="fb:admins" content="my_admin_id" />
    <meta property="og:url" content="<?php the_permalink() ?>"/>
<?php if (is_single()) { ?>
    <meta property="og:title" content="<?php single_post_title(''); ?>" />
    <meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />
    <meta property="og:type" content="article" />
    <meta property="og:image" content="<?php echo wp_get_attachment_thumb_url( get_post_thumbnail_id( $post->ID ) ) ?>" />
<?php } else { ?>
    <meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
    <meta property="og:description" content="<?php bloginfo('description'); ?>" />
    <meta property="og:type" content="website" />
    <meta property="og:image" content="<?php bloginfo('template_url') ?>/logo.jpg" />
<?php } ?>

As well as in designers.facebook.com/tools/debug/ it provides me with these messages:

Scrape Information

Response Code: 502

Fetched URL: www.mysite.com/publish-1

Canonical URL: www.mysite.com/publish-1

Critical Errors That Must Definitely Be Fixed

Error Scraping Page: Bad Response Code

Open Graph Alerts That Needs To Be Fixed

Deduced Property: The og:url property ought to be clearly provided, even when something could be deduced using their company tags.

Deduced Property: The og:title property ought to be clearly provided, even when something could be deduced using their company tags.

Have I done a problem, can there be another "correct" method for wordpress site? Basically did how do i repair it?