I want to auto share links in my facebook wall using this script :
$attachment = array(
'email' => 'mail',
'password' => 'password',
'access_token' => 'my token',
'message' => "my message",
'name' => 'name',
'link' => 'my_url',
'description' => "my description"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://graph.facebook.com/me/links');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0) Gecko/25250101');
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$json = json_decode($result);
$post_id = $json->{'id'};
curl_close($ch);
at the began it worked for me but after trying it for 7 times or more i got this error :
{ "error": { "message": "(#100) The parameter url is required", "type": "OAuthException", "code": 100 } }
how can I fix it