Hi Rajesh,

Does this occur on all direct messages you send, or does it only
happen occasionally?

Taylor

On Tue, Sep 7, 2010 at 9:46 PM, Rajesh <ssrajesh....@gmail.com> wrote:

> i used twiiter api for status update,get connection,send message,
>
> status update and get connection working fine ,
>
> but in send message getting
>
> 8/September/2010 10:15:33: {"request":"/1/direct_messages/
> new.json","error":"Invalid request."}
>
> * TO SEND JOB DETAILS MESSAGE TO Twitter CONNECTIONS
>         */
>        public function sendMessage($token, $sender_id=array(), $message)
>        {
>                global $logger;
>                $client = $token->getHttpClient($this->option_array);
>                $message = "checkout this job jobsbyref";
>
>                $message_encode=urlencode($message);
>
>
>                $logger->debugLog("sender id is--------
> -------------------");
>                $logger->printArray($sender_id);
>                //$logger->debugLog("message".$message);
>                // Set Method (GET, POST or PUT)
>                $client->setMethod(Zend_Http_Client::POST);
>                for($i=0;$i<count($sender_id);$i++)
>                {
>                        $client->setUri('
> https://api.twitter.com/1/direct_messages/
> new.json');
>                        $client->setParameterPost('user_id',$sender_id[$i]);
>                        $client->setParameterPost('message',$message);
>                        $logger->debugLog("client value is-------------");
>                        $logger->printArray($client);
>                        $response =$client->request();
>                        $logger->debugLog("inside send message--
> wdwdeff---------------------------");
>                        $logger->printArray($response->getBody());
>                }
>        }
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk?hl=en
>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en

Reply via email to