facebook application problem?

Discussion in 'PHP' started by Derpost, Jul 29, 2011.

  1. #1
    you can see this: http://disavur.com/facebook
    this is my code:

    $user = $facebook->getUser();
    
    if($user) { 
        try {
           $statusUpdate = $facebook->api('/me/feed', 'post',
                     array('name'=>'My APP on Facebook','message'=> 'I am here working',
                     'privacy'=> array('value'=>'CUSTOM','friends'=>'SELF'),
                     'description'=>'testing my description',
                     'picture'=>'https://fbcdn-photos-a.akamaihd.net/mypicture.gif',
                     'caption'=>'apps.facebook.com/myapp','link'=>'http://apps.facebook.com/myapp'));
         } catch (FacebookApiException $e) {
              echo "error";;
        }
    }
    else
    {
    
        echo "<a href='" . $facebook->getLoginUrl() . "'>login</a>";
    }
    PHP:
    This code returning "error".. Where is the error?
     
    Derpost, Jul 29, 2011 IP