title: Facebook php schedule post - error unexpected exception
body: <p>I have a script for posting to managed pages which works unless i try and schedule the post. It fails on </p>
  
  <pre><code>Array ( [error] =&gt; Array ( [message] =&gt; An unexpected error has occurred. Please retry your request later. [type] =&gt; OAuthException [code] =&gt; 2 ) )
  </code></pre>
  
  <p>I came across this <a href="https://stackoverflow.com/questions/23597793/facebook-graph-api-error-when-posting-scheduled-post-on-business-page">Facebook Graph API error when posting scheduled post on Business page</a> stating it could be a issue with the "link" but not specifying which link. But i tried all of them but still getting the same errors.</p>
  
  <p>Also on a side question....do page access tokens expire? There seems to be some confusion over these. </p>
  
  <pre><code>    foreach($_POST['fb'] as $key=&gt;$code){
  
      $facebookpage= $key;
      $facebookaccesstoken= $code;
  
      $newfacebook = new Facebook(array(
          'appId'  =&gt; $appId,
          'secret' =&gt; $appSecret
          )); 
  
  $time= time();
  $newtime= $time +13600;
  
  $attachment=array(
      'access_token'=&gt; $facebookaccesstoken,
      'published' =&gt; false,
      'scheduled_publish_time'=&gt; $newtime,
      'message'=&gt; "new sasa posting me!",//user message
      'name'=&gt; 'Anyone sasa interested in this? Check out my advert!',//title
      'link'=&gt; 'http://testserverdavideec.mx.nf/wp-content/uploads/2014/05/user53734efe383247.67413395boats.jpg', // link to advert
      'description'=&gt; 'myadvert asa brings the milkshakes',//inner ad
      'picture'=&gt;'http://testserverdavideec.mx.nf/wp-content/uploads/2014/05/user53734efe383247.67413395boats.jpg',//picture url if empty= site logo
      'actions'=&gt;array(array(
          'name'=&gt;'dshjs',
          'link'=&gt;'http://testserverdavideec.mx.nf/wp-content/uploads/2014/05/user53734efe383247.67413395boats.jpg'
      ))
  );
  $post_url='/'.$facebookpage.'/feed';
  
  try{
      $result=$newfacebook-&gt;api($post_url,'POST',$attachment);
      echo '&lt;h1&gt; result=&lt;/h1&gt;';    var_dump($result);
  } catch (FacebookApiException $e) {
  print_r($e);
  } 
  
  
  
  }
  </code></pre>