Alex Rivera | Logout

How can I post new comment with Graph API into Social Comments Box?

Asked 2011-10-19T20:08:12.453
8

I have facebook social comments box. How can I post comment through graph API to it?

Edit
Report

1 Answer

-2

Its very easy as you post on user feed after getting access_token with publish stream token

I assume you use PHP SDK if you need in other let me known

You just need Step 4 but i give you more details in Step 1 to 3 so you can understand and do clearly

Step 1

get the user access token

        $token = $facebook->getAccessToken();
        echo "</br>" . 'Access_Token:' . $token;

Step 2
set default access token and profile

        $facebook->setAccessToken($token);

Step 3
compile the post

    $WallPost = array(
    'message' => 'hey this app is cool!!',
    'link' => $canvas_page,
    'caption' => 'caption',
    'description' => 'Test Description',
            );  // you can also use 'picture', 'description', 'source'.... 

Step 4
post to wall or your Social Comment Plugin

        $response = $facebook->api('/me' . '/feed','POST',$WallPost);

Thanks

answered 2012-02-06T06:33:39.617

Your Answer