Closed Haseeb90 closed 9 years ago
I have the following code $postMessage = json_decode( $fb->request('POST', "/me/feed?access_token={$_SESSION['facebook_access_token']}", array ( 'message' => 'This is a test message' ) ), true ); return $postMessage;
but im getting the following error {"error":{"type":"OAuth\Common\Http\Exception\TokenResponseException","message":"Failed to request resource."
Where as when I do this $user = json_decode( $fb->request( "/me?access_token={$_SESSION['facebook_access_token']}" ), true );
it works fine
I found the mistake ... The call is supposed to be as follows
$postMessage = json_decode( $fb->request (
"/me/feed?access_token={$_SESSION['facebook_access_token']}",
'POST',
array (
'message' => 'This is a test message'
)
),
true );
The route is supposed to be first and then the POST.
I got the access_token and I have gotten all the permissions required but can't figure out how to post to the users wall