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

  • Home
  • SEARCH
  • 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 6470773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:08:57+00:00 2026-05-25T06:08:57+00:00

I am running a page that utilizes the Facebook PHP SDK to post a

  • 0

I am running a page that utilizes the Facebook PHP SDK to post a Facebook update to a Facebook fan page. I have setup the app, allowed full access (offline access, manage pages, stream update) to the user account, made sure I am the admin to the fan page and generated the access token. Here is the code I am using to test this:

$APP_ID = '****';                       
$APP_SECRET = '*****';          
$PAGE_ID = '****';                          
$ACCESS_TOKEN = '****';

//Initiate a facebook instance
$facebook = new Facebook(array(
  'appId'  => $APP_ID,
  'secret' => $APP_SECRET,
  'cookie' => true,
));

//To keep this as simple as possible, we'll only be posting a message to the wall with our access token we received from accounts
$attachment = array('message' => "test", 'access_token' => $ACCESS_TOKEN);

$result = $facebook->api('/'.$PAGE_ID.'/feed', 'post', $attachment);

if($result){ 
    echo "<p>Posted status update</p>";
}

This gives me a success message but does not actually post anything to anywhere. If I change this line:

$result = $facebook->api('/'.$PAGE_ID.'/feed', 'post', $attachment);

to this:

$result = $facebook->api('/me/feed', 'post', $attachment);

It works like a charm and posts the update to the my Facebook wall, and not my fan page. All of the tutorials I have seen and questions I have read on here lead me to believe that my code should be posting to my fan page, what am I missing?

  • 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-25T06:08:57+00:00Added an answer on May 25, 2026 at 6:08 am

    Is this your own Page, or are you trying to post to a page you’re a fan of instead?

    If this is your page, use the page access token you can retrieve at the /me/accounts endpoint to post as the page

    If it’s not, you must like the Page before you can post on its wall

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

Sidebar

Related Questions

I have a Facebook app running in a Page Tab (the tab of a
I have an instance of TinyMCE running on a page that enables me to
I have this page that i have a rotate slideshow running. I have it
I have a php page that runs on a local uri on a local
I have a particular PHP page that, for various reasons, needs to save ~200
I have a long running SQL query inside a page that I've sped up
Let's say I have a greasemonkey-type user script running on a page that has
I have a JSP page that has 2 forms running on Tomcat 6. One
We have a long running data transfer process that is just an asp.net page
I'm running a web page that has a SL 'box' in it. I know

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.