upgrade new php sdk
    

>**Can someone help me update this code for the new php-sdk?**



>require_once "facebook.php"; 



 
>$appapikey = "xxxxx";





>$appsecret = "xxxx";




>$facebook = new Facebook($appapikey, $appsecret);




 
>$user_id = $facebook->require_login();




 
>$my_array = $facebook->api_client->users_getInfo($user_id,"first_name,pic_big");




 
>// getting user name and profile picture




>$text = $my_array[0][first_name];




>$pic = $my_array[0][pic_big];



 
>// core function: creation of the horror picture




>create_pic($user_id,$text,$pic);




 
>$has_permission = $facebook->api_client->users_hasAppPermission("photo_upload");
 



>if($has_permission and $_GET[pub]){




>$response_array = $facebook->api_client->photos_upload("temp/".$user_id.".jpg", "", 

>"Created with http://apps.facebook.com/", $user_id);




>}
 
 
upgrade new php sdk
===

    

>**Can someone help me update this code for the new php-sdk?**



>require_once "facebook.php"; 



 
>$appapikey = "xxxxx";





>$appsecret = "xxxx";




>$facebook = new Facebook($appapikey, $appsecret);




 
>$user_id = $facebook->require_login();




 
>$my_array = $facebook->api_client->users_getInfo($user_id,"first_name,pic_big");




 
>// getting user name and profile picture




>$text = $my_array[0][first_name];




>$pic = $my_array[0][pic_big];



 
>// core function: creation of the horror picture




>create_pic($user_id,$text,$pic);




 
>$has_permission = $facebook->api_client->users_hasAppPermission("photo_upload");
 



>if($has_permission and $_GET[pub]){




>$response_array = $facebook->api_client->photos_upload("temp/".$user_id.".jpg", "", 

>"Created with http://apps.facebook.com/", $user_id);




>}
 
 