如何使用图形API替换Facebook应用程序图像与配置文件图片?

i use this code but its not working

$uid =$facebook->getUser(); 
$picture="http://graph.facebook.com/".$uid."/picture?type=large";

The code you share, is a Graph API call to get the User Picture,
you can use this function to get the user picture:

function avatar($id,$size) {
    if ($size) {
        $size = '?type='.$size.'';
    }
    return '<img src="https://graph.facebook.com/'.$id.'/picture'.$size.'" alt="" />';
}

i pass a second variable for the picture size, so you can use it like this:

echo avatar($uid,'square');