[twitter-dev] Twitter status update through a Ajax Post

2010-02-12 Thread atomic mouse
Hello Friends;

In December I wrote a little function to allow users to update our
Twitter status by  completing a form embedded in our CMS. This has
worked fine untill last week.

The script simply sends a ajax post to http://twitter.com/statuses/
update.xml

Unfortunately it returns the following error:
  Permission denied - line 13

Which is the line stating :
  axobj.open(POST,purl,false,my username,my password);

*The my username and my password is replaced with the correct
login details at runtime.

Here is the complete test code:

%...@language=JAVASCRIPT CODEPAGE=1252%
html
head
title/title
script type=text/javascript
function asp_twitter_update(strMsg)
{

var axobj,purl;

purl = http://twitter.com/statuses/update.xml;;

axobj = new ActiveXObject(Microsoft.XMLHTTP);
axobj.open(POST,purl,false,UPTuks,brandewyn);
axobj.setRequestHeader(Content-type, application/x-www-form-
urlencoded);
//axobj.setRequestHeader(Connection, close);

axobj.send(status=+Server.URLEncode(strMsg));

}

asp_twitter_update(This is the new status message to be posted);
/script
/head
body

/body
/html

I have spent around 18 hours so far trying to solve this problem, but
no luck so far.

Any and all help in resolving this will be greatly appreciated.

Regards


Re: [twitter-dev] Twitter status update through a Ajax Post

2010-02-12 Thread Raffi Krikorian
hi!

i see nothing obviously wrong with this - is this hosted somewhere so we can
hit it with a browser and see what's being generated by the browser request?

On Fri, Feb 12, 2010 at 1:37 AM, atomic mouse quickf...@gmail.com wrote:

 Hello Friends;

 In December I wrote a little function to allow users to update our
 Twitter status by  completing a form embedded in our CMS. This has
 worked fine untill last week.

 The script simply sends a ajax post to http://twitter.com/statuses/
 update.xml

 Unfortunately it returns the following error:
  Permission denied - line 13

 Which is the line stating :
  axobj.open(POST,purl,false,my username,my password);

 *The my username and my password is replaced with the correct
 login details at runtime.

 Here is the complete test code:

 %...@language=JAVASCRIPT CODEPAGE=1252%
 html
 head
title/title
 script type=text/javascript
 function asp_twitter_update(strMsg)
 {

var axobj,purl;

purl = http://twitter.com/statuses/update.xml;;

axobj = new ActiveXObject(Microsoft.XMLHTTP);
axobj.open(POST,purl,false,UPTuks,brandewyn);
axobj.setRequestHeader(Content-type, application/x-www-form-
 urlencoded);
//axobj.setRequestHeader(Connection, close);

axobj.send(status=+Server.URLEncode(strMsg));

 }

asp_twitter_update(This is the new status message to be posted);
 /script
 /head
 body

 /body
 /html

 I have spent around 18 hours so far trying to solve this problem, but
 no luck so far.

 Any and all help in resolving this will be greatly appreciated.

 Regards




-- 
Raffi Krikorian
Twitter Platform Team
http://twitter.com/raffi