Created
June 29, 2011 18:51
-
-
Save cemkozinoglu/1054582 to your computer and use it in GitHub Desktop.
My Solution for Twitter
This file contains 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
<!-- dont forget to include jQuery --> | |
{% if account.provider == 'twitter' %} | |
<script type="text/javascript"> | |
$(function(){ | |
$.ajax({ | |
url : "http://api.twitter.com/1/users/show.json?user_id={{ account.uid }}", | |
dataType : "jsonp", | |
success : function(data) | |
{ | |
$('#twi').html('<img src="' + data.profile_image_url + '" align="absmiddle"> ' + data.screen_name); | |
}, | |
error : function() | |
{ | |
}, | |
}); | |
}); | |
</script> | |
<img src="http://icons.iconarchive.com/icons/jankoatwarpspeed/handycons-2/32/twitter-icon.png" align="absmiddle"> <span id="twi"></span> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment