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 6785553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:08:27+00:00 2026-05-26T17:08:27+00:00

I have a website, and I need it to post status updates to a

  • 0

I have a website, and I need it to post status updates to a Facebook Page from time to time.

Using my personal Facebook account, I created an App, and a Page. So far, I’ve been able to programmatically post to my Page’s Wall, by adding this code to my website:

include_once "lib/facebook/src/facebook.php";

$facebook = new Facebook(array('appId' => 'APP_ID_HERE', 'secret' => 'APP_SECRET_HERE'));

if($facebook->getUser()) {

    try {
        $ret_obj = $facebook->api('/FACEBOOK_PAGE_ID_HERE/feed', 'POST', array(
            'link' => 'www.example.com',
            'message' => 'Posting with the PHP SDK!',
            'access_token' => 'FACEBOOK_PAGE_ACCESS_TOKEN_HERE'
        ));
        echo '<pre>Post ID: ' . $ret_obj['id'] . '</pre>';

    } catch(FacebookApiException $e) {
      // user logged out (has user_id, but invalid access token)
      $login_url = $facebook->getLoginUrl(array('scope' => 'publish_stream')); 
      echo 'Please <a href="' . $login_url . '">login.</a>';
    }
    echo '<br /><a href="' . $facebook->getLogoutUrl() . '">logout</a>';

} else {

    $login_url = $facebook->getLoginUrl(array('scope' => 'publish_stream'));
    echo 'Please <a href="' . $login_url . '">login.</a>';

}

So I just open my website, click “Please login”, login as myself. Once I’m logged it, it will now be able to post the status update to the Facebook Page.

Obviously, the problem here is that I need to be logged in for it to be able to post. If other users will try to login with their user accounts, my website cannot post status updates to the Facebook Page because I am the only Admin for the app/Page.

My question is, is there a way for me to programmatically log myself into Facebook so I can do these status updates to my Page automatically?

Sorry, total noob here to Facebook development.

  • 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-26T17:08:28+00:00Added an answer on May 26, 2026 at 5:08 pm

    Seems like you need to update status while you are offline from facebook. To do this you need to get the offline access permission of the app user and you need to have a “infinite” token for facebook app to access the APIs, so that your program can update anytime you want with out logging into facebook.

    You may get something you want here

    http://developers.facebook.com/docs/authentication/

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

Sidebar

Related Questions

I need to post data to a website. So I created a small app
I have a website that relies on dependency injection, using Castle Windsor. I need
I have one custom website with code created 100% by me. I need to
I need to download images from a website, and I have the login name
fellow devs! I have a class for posting to website using a POST or
I need to Post Forms and Upload Files to a website using Linux Command
I have a website that I have registered as a facebook app - I
I have a website where people post links from Google+. I am trying to
I have an ASP website which I need to add a RegEx match to.
I have a website for which I need to implement the admin interface. The

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.