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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:11:07+00:00 2026-05-26T08:11:07+00:00

I’ve done a lot of searching and I’ve found outdated tutorials that don’t work…

  • 0

I’ve done a lot of searching and I’ve found outdated tutorials that don’t work…

I have a site made with PHP and when I submit a particular form in my admin area, I want to publish to my Facebook “fan page”

There is no RSS available, so do you have any example to directly post to the Facebook fan page (not user wall) using php sdk?

Thank you!

  • 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-26T08:11:07+00:00Added an answer on May 26, 2026 at 8:11 am

    Finally, after a lot of tests, it worked, without the PHP SDK. This is the step by step guide:

    1. Get permissions and the page token

    Go to https://developers.facebook.com/tools/explorer/ and select your app from the first drop down menu, in the left.

    Click on the button “Get access token”, and in the “Select Permissions” window, click in “Extended Permissions” and check manage_pages and publish_stream, and click in “Get Access Token” blue button.

    You may be asked in this step to grant permissions to your app to access to your Facebook account, accept.

    Next, click at the end of the text field next to the “GET” drop down, and replace the numbers for: me/accounts, and click in the blue button next to this text field.

    You’ll get the tokens for all your pages, including your app page. Find your page name in the list, will look like this: “name”: “Your page name”

    When you located your page, copy the access token for the page (will be really long), that can look like this: “access_token”: “XXXXXXXX”. Also copy the id of the page: “id”: “XXXXX”.

    That’s all for this step, we can start coding now.

    2. Post to your page wall via PHP

    First, for this script, you’ll need a server supporting curl.

    We start the PHP document defining the page access token and the page id that we’ve get in the 1st step:

    <?php
    $page_access_token = 'XXXXXXX';
    $page_id = 'YYYYYYYY';
    

    After that, we create an array with the info to post to our page wall:

    $data['picture'] = "http://www.example.com/image.jpg";
    $data['link'] = "http://www.example.com/";
    $data['message'] = "Your message";
    $data['caption'] = "Caption";
    $data['description'] = "Description";
    

    You can of course, use any other post parameter described in https://developers.facebook.com/docs/reference/api/post/ and if you don’t need one or many of the parameters above you can simply delete it.

    Ok, At this point we add to the array the access token:

    $data['access_token'] = $page_access_token;
    

    And we set our post URL, to post in our page:

    $post_url = 'https://graph.facebook.com/'.$page_id.'/feed';
    

    And the last step, we’ll use a curl to post our message in our page wall:

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $post_url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $return = curl_exec($ch);
    curl_close($ch);
    ?>
    

    After that, we can save our PHP document, and try to execute it. The post may appear in our Facebook page.

    Hope this code helps to other people with the same problem!

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.