For example, say I was using the twitter widget here:
http://twitter.com/about/resources/widgets/widget_profile
And I was filling in the input automatically and pulling tweets using javascript. If I do this on page load for a twitter username with protected tweets, the dialog will ask me for a username and password.
Is there anyway to prevent this from happening. Like to somehow check in the background using only javascript is the tweets are protected without triggering this dialog.
Using the oAuth isn’t an option here.
Thanks!
EDIT:
var twitter_url = "http://api.twitter.com/1/statuses/user_timeline.json?&screen_name=" + twitter_handle + "&count=20&callback=?";
$.getJSON(twitter_url, function(data){
loadtwit(data);
});
But if the response is a prompt for a username and passowrd rather than a successful return of the user json, i’d like to kill the request. I’m not sure how to do that. Thanks.
You could use the users/show method(http://dev.twitter.com/doc/get/users/show) like:
data.protectedis true if the user profile is protected.