tags:

views:

138

answers:

3

Hi all,

I am trying to display the latest 3 tweets from twitter on my clients website.The tweets are set as private.How do i pass the username/password to get the data for the latest tweets.Can i do it with Jquery.If yes, please let me know how i can do it.

thks, anu

A: 

There is (at least one) JavaScript OAuth implemetation that you can use to communicate with Twitter using OAuth protocol. It's not jQuery or so I believe but you would be able to use it from jQuery code. Be aware that this may not be trivial

DroidIn.net
I am using asp.net to develop the website to display the feed.Is there any way i can use asp.net and ajax to display the feeds.thks
You probably better off with using .NET OAuth library (look here http://is.gd/4uOaE for the list of some that are available) Again - this stuff is far from trivial but generally you need to know that Twitter is using OAuth protocol for custom apps development. So you need to register your app get the dev key and token and then go from there. I'm affraid that there's no quick and easy pre-packaged solution at this point
DroidIn.net
A: 

If you're using AJAX to call out to same-domain pages or webservices, which are using server side scripting to fetch tweets - then check out this previous question on Stack Overflow for a Twitter API for C#/ASP.NET

http://stackoverflow.com/questions/1551486/twitter-api-for-netapplications

If you're hoping to actually fetch the Tweets client-side from yourdomain.com directly to Twitter, you can use Ajax + jsonp, though I'm not sure if you can do it as an authenticated user.

WesleyJohnson
A: 

This is what I got after doing some research on this topic.

I was able to create alternate url to connect to private tweets in twitter using the site http://freemyfeed.com/.

I have created the below code to get the tweets from twitter.The issue is that i need to refresh the code to get new tweets every 10 minutes.I tried to do that using the code below, but it returns the data for the first time after that its not refreshing automatically.Can some one help me to correct the code. Appreciate ur help

  google.load("feeds", "1");
  loadTweet();
  setInterval ("loadTweet()", 10000);
  function newSlideShow() {
        var feed = new google.feeds.Feed("http://freemyfeed.com/feed/[mykey=I removed the key before adding to this message]");
        feed.load(function(result) {  if (!result.error) {   
        var container = document.getElementById("feedControl");  
        //container.value='';
        for (var i = 0; i < result.feed.entries.length; i++) {  
        var entry = result.feed.entries[i];     
        var attributes = ["title", "link", "publishedDate", "contentSnippet"];   
        for (var j = 0; j < attributes.length; j++) {   
        var div = document.createElement("div");    
        //alert(document.createTextNode(entry[attributes[j]]));
        div.appendChild(document.createTextNode(entry[attributes[j]]));   
        container.appendChild(div);   


          }    }  }});
      }
      function loadTweet(){
      google.setOnLoadCallback(newSlideShow);
        }