I have a script that succesfully posts to my friend wall link and message, but when i turn on loop like this:
for ($i = $from; $i <= $to; $i++) {
$sendTo = $userid[$i];
echo '<p>sending user '.$i.'</p>';
if($result = $facebook->api("/$sendTo/feed/",'post', $attachment))
{
echo '<p>sended user '.$i.'</p>';
} else {
echo 'Oops something went wrong';
}}
it only posts 4 or 5 messages and then break. I suppos the problem is at facebook does not allowing many message to send in short time. How can i make some timeout function or something to post at least 100 messages? When i post only 5 messages i manage to post 100 messages 5 by 5, but i need to post 100 by 100. Can you help me please?
Thank you for your time and best regards