Get Private RSS feeds from twitter
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 t开发者_运维知识库he data for the latest tweets.Can i do it with Jquery.If yes, please let me know how i can do it.
thks, anu
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
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
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.
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);
}
精彩评论