This code works fine.
echo '<html><body>'; echo '<form enctype="multipart/form-data" action="'.$graph_url.'" method="POST">'; echo '<input name="message" type="text" value=""><br/><br/>'; echo '<input type="submit" value="POST"/><br/>'; echo '</form>'; echo '</body></html>';
But i get the above error 368 while doing task with below code
$graph_url = "https://graph.facebook.com/me/feed?"."access_token=".$access_token;
$fields = array('message' => 'Hi,');
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string,'&');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$graph_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST,count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS,$fields_string);
$result = curl_exec($ch);
$decoded = json_decode($result, true);
print_r($result);
Please can anyone tell me why its giving this error and whats the solutions.
I want to do this task with the code giving error.
So please help to solution this error.

New Topic/Question
This topic is locked




MultiQuote







|