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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:42:09+00:00 2026-05-30T07:42:09+00:00

I want to post on wall using fb API, When I post a message,

  • 0

I want to post on wall using fb API, When I post a message, after share, the link opens and popup remains open.
Code is

function writeOnWall()
  { 
    FB.init({ 
        appId:'292656140795961', 
        xfbml:true 
     });

     FB.ui({ 
     method: 'feed', 
     name: 'First Application'
     });
  }
  • 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-30T07:42:10+00:00Added an answer on May 30, 2026 at 7:42 am

    You can use the following code to post into facebook wall , just call the function with proper arguments

    Try this ,

    <?php
    
    
        function doWallPost($postName='',$postMessage='',$postLink='',$postCaption='',$postDescription='')
        {
        $FB_APP_ID='xxxxxxxxxxxxxxxxxxxxxxxx';
        $FB_APP_SECRET='xxxxxxxxxxxxxxxxxxxxxxxxxxx';
    
        $APP_RETURN_URL=((substr($_SERVER['SERVER_PROTOCOL'],0,4)=="HTTP")?"http://":"https://").$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
    
        $code = $_REQUEST["code"];
    
        if(empty($code)) 
        {
            $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=".$FB_APP_ID."&redirect_uri=".$APP_RETURN_URL."&scope=publish_stream";                  
            header("Location:$dialog_url");
        }
    
        $token_url = "https://graph.facebook.com/oauth/access_token?client_id=".$FB_APP_ID."&redirect_uri=".urlencode($APP_RETURN_URL)."&client_secret=".$FB_APP_SECRET."&code=".$code;
        $access_token = file_get_contents($token_url);
    
        $param1=explode("&",$access_token);
        $param2=explode("=",$param1[0]);
        $FB_ACCESS_TOKEN=$param2[1];
    
    
        $url = "https://graph.facebook.com/me/feed";
        $attachment =  array(   'access_token'  => $FB_ACCESS_TOKEN,                        
                        'name'          => $postName,
                        'link'          => $postLink,
                        'description'   => $postDescription,
                        'message'       => $postMessage,
                        'caption'       => $postCaption,
                    );
    
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,2);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
        $result=curl_exec($ch);
        header('Content-type:text/html');
        curl_close($ch);
    
        return $result
        }
    
    
    
    
    
    
    
        ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to post on wall using fb API, When I post a message,
I'm posting to a User's wall using the Post API . I want the
I m publishing message on user wall using fb Post to your wall popup,
i want post a message on a facebook wall, i integrated facebook sdk in
I am using the following PHP code to post to my page wall. it
Hi I am using the graph API to post to the the wall of
im using the js sdk to post message to friends wall from my website
I have an application which will post a message on a friends wall using
i little speak english i want create feed (post, note, link) to page wall
I'm trying to post a result on user's wall using the following code $attachment

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.