Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

post to twitter from my own website

Guest
Apr 14, 2011 Apr 14, 2011

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

664
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 14, 2011 Apr 14, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources