I am making request using as3 on graph api.
For example I am requesting this url.
http://graph.facebook.com/100001217469714/picture
But I am redirected to this url.
http://profile.ak.fbcdn.net/hprofile-ak-snc6/274715_100001217469714_1254733069_q.jpg
I would like to get this redirected url to my AS3 code as string.
How should I do this?
I am doing it because I am loading profile pictures from Facebook to my game. But I have to discover if user uploaded photo or have facebook predefined photo.
var url : String = 'http://graph.facebook.com/'+id+'/picture?width=100&height=100';
var urlRequestPicture : URLRequest = new URLRequest(url);
urlRequestPicture.method = URLRequestMethod.GET;
var loaderPicture : Loader = new Loader();
loaderPicture.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompletePicture);
loaderPicture.load(urlRequestPicture);
function onCompletePicture(e:Event){
var bitmap:Bitmap = e.target.content;
bitMapArray.push(bitmap);
}
The url property in target should give you the url of the image :