Copy link to clipboard
Copied
In my web site, I have a text message and I want to post it in my own twitter by pushing a submit button. It works if I already logged in to my twitter from twitter website but if I don't, it goes to login page and after logging in, it posted the message.
My code is:
(in my form)
<cftextarea name="Twittermsg" tooltip="Twitter message" id="Twittermsg" style="width:530px" />
<cfinput type="button" name="btn1" id="btn1" onClick="pushbtn();" />
(javascript)
<script type="text/javascript" >
function pushbtn(){
var var1=document.getElementById("Twittermsg").value;
var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(var1);
window.open(twtLink) ;
}
</script>
Can anyone help me to write code for automatically log in to my own web page?
Thanks,
Mandana
Copy link to clipboard
Copied
This isn't really a CF question, so I'm not sure you'll get the best answers here.
However what I can tell you is that you're probably going about it the wrong way. Twitter have an API which is made for *exactly* this purpose and handles all this for you.
Take a look at the documentation for the API, that should tell you everything you need to know.