Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7076755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:20:13+00:00 2026-05-28T06:20:13+00:00

I managed to post a status to my wall with a custom app, but

  • 0

I managed to post a status to my wall with a custom app, but what I want to do, is schedule the status, to be posted on a given datetime.

The problem was, when I close my app, the script is aborted.
Right now it works, I’m using ignore_user_abort(true) and sleep().

I’m also using set_time_limit(1), once the given datetime has passed, so the script stops.

I feel like this is crappy coding and want to know if there’s a better way to do this?

Here’s the code I’m using right now:

<?php
 ignore_user_abort(true);
 $token=$_GET["access_token"];
 $attachment =  array(
    'access_token' => "$token",
    'message' => "deze post moet om 14.14 online komen",
    'name' => "testpost",
    'link' => "http://myurl.be/",
    'description' => "Write here your description",
    'picture'=> "http://myurl/assets/images/layout/logo.png");

date_default_timezone_set('Europe/Belgrade');
$time= date('d/m/Y H:i');
if ("10/01/2012 14:14" < $time ){
set_time_limit(1);
$result = $facebook->api('/me/feed/','post',$attachment);
}else{
sleep(60);
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "https://www.myurl.com/tests/facebooklogin/post.php?access_token=".$token);
curl_exec ($curl);
curl_close ($curl);
}  
print $result;
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:20:14+00:00Added an answer on May 28, 2026 at 6:20 am

    You could store all the information needed for your post (text, link, description and so on) in a database (like MySQL), setup a PHP script that get’s called periodically by cron and fetches all posts from the database that need to be posted by the time the script get’s executed.

    But be aware that access tokens expire after a few hours/a day or when the user changes his password. Unless you don’t have a “offline_access” permission, then the token never expires.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want my app to be able to post status updates to a specific
I managed to found out how to delete field but I have a problem
Essentially I want to have my blog grab wall photos, status updates, etc. from
I managed to post status updates on facebook walls and log in via the
Following is my script which i want to use to update status on my
I'm trying to create a script that post status updates on facebook pages without
Just started with JQuery and I've managed to pass a parameter using POST, firebug
All, in this post xp_cmdshell Query Length Too Large I managed to obtain a
I managed to request the publish_actions permission, but since it is revocable from the
Recently I've been working on understanding how to post on the users Facebook wall

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.