Hello,
I am working on a page, and i must retrieve the user’s profile image from js, client side. I want the image content so i can use it within canvas.
After searching the docs it seems i cannot retrieve a profile image using pure js client site.
The reason is cross domain origin security policy.
Could someone confirm that, or enlighten me on how to achieve this ?
Here is what i tryed and not worked because of browser security:
$.ajax({
url : ‘http://a0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png’,
cache : false,
success : function ( image ) {
console.log( image );
console.log( “^^twitter” );
},
error: function ( e ) {
console.log(“ERROR:”);
console.log( e );
},
type: ‘GET’
});