Scheduled posting to Facebook in PHP cURL -


i have been trying post status @ scheduled date/time facebook using php curl.

i using unix timestamp value parameter scheduled_publish_time , published=false. in facebook can see post being scheduled @ given time.

but unfortunately nothing gets posted @ time , facebook still shows message "next post scheduled #time" after time has elapsed.

code:

<?php   $facebook_page_id='xxx';       $facebook_page_access_token="xxx";    //facebook page post   $status='scheduled post';    $fb_page_post="https://graph.facebook.com/{$facebook_page_id}/feeds?message=$status&scheduled_publish_time=1431683900&published=false&access_token=$facebook_page_access_token";    $ch=curl_init();   curl_setopt($ch, curlopt_url, $fb_page_post);   curl_setopt($ch, curlopt_post, true);   curl_setopt($ch, curlopt_referer, '');   curl_setopt($ch, curlopt_encoding, 'gzip,deflate');   curl_setopt($ch, curlopt_autoreferer, true);   curl_setopt($ch, curlopt_returntransfer, 1);   curl_setopt($ch, curlopt_timeout, 10);    $fb_page_post = json_decode(curl_exec($ch));   curl_close($ch);    var_dump($fb_page_post); 

when run script through terminal , var_dump() response gives me output :

object(stdclass)#2 (2) { ["id"]=> string(16) "1414369492218829" ["post_id"]=> string(33) "1387602394895539_1414369492218829" } 

what solution ? necessary changes need make ?

thank

remove published=false. means no feed story should created, at all.

using scheduled_publish_time only need create scheduled post, appear on page’s timeline when specified timestamp reached.

https://developers.facebook.com/docs/graph-api/common-scenarios#scheduledposts


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -