Created
July 28, 2011 15:23
-
-
Save watagashi/1111738 to your computer and use it in GitHub Desktop.
twicli plugin, measures againt API errror
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function twAuthFallback() { | |
// verify_credentials API is unavailable? | |
re_auth = true; | |
xds.load_default(twitterAPI + "users/show.json?suppress_response_codes=true&screen_name="+myname, twAuth); | |
} | |
function auth() { | |
if (use_ssl) | |
twitterAPI = twitterAPI.replace('http', 'https'); | |
var name = readCookie('access_user'); | |
if (name) { | |
name = name.split('|'); | |
myname = last_user = name[0]; | |
myid = name[1]; | |
$("user").innerHTML = last_user; | |
update(); | |
} | |
xds.load(twitterAPI + "account/verify_credentials.json?suppress_response_codes=true", twAuth, twAuthFallback, 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment