Call to undefined function wordpress_get_attachment_src()

Object at URL 'http://www.website.com' of type 'article' is invalid since the given value ': Call to undefined function wordpress_get_attachment_src() in online Fatal error ...... functions.php123 ' for property 'og:image:url' couldn't be parsed as type 'url'.

by using this code in header.php

<meta property="og:image" content="<?php echo get_fbimage(); ?>" />

in function.php

<?php
function get_fbimage() {
$src = wp_get_attachment_src( get_post_thumbnail_id($post->ID), '', '' );
if ( has_post_thumbnail($post->ID) ) {
$fbimage = $src[0];
} else {
global $post, $posts;
$fbimage = '';
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i',
$post->post_content, $matches);
$fbimage = $matches [1] [0];
}
if(empty($fbimage)) {
  $fbimage = "http://www.gogirlfinance.com/wp-content/uploads/2011/03/logo.jpg";
}
return $fbimage; 
}
?>

Note: I'm using same code/ function in other website