Issue with sending out a direct message more than once


#1

Hey guys,

So I have a app that will monitor status’s and if a certain status is made it will run through PHP code that will send out a direct message from each user that was stored in a database. My issue is, all my messages are not being send out. Only 1 of lets say out of 3 are being sent and that one that sent is sending out twice. The weird thing is my end shows me iterating correctly and when I check the parameters that are being put into the post, they are correct.

Code:

$parameters = array(‘screen_name’ => $inerlevelWatch, ‘text’ => $NewDirectMessage);
$method = ‘direct_messages/new’;
$z->post($method, $parameters);


So this is how I am sending it out....the $inerlevelWatch will be the account that the direct message is sending to the the $New..Message is where the message for each account is placed inside here.

So like I said before,if I <code>print_r($parameters);</code> - it shows the right values inside and everything. So I don't know what is wrong?

Please let me know if you can help!

David Biga