I’m pulling photos from albums on a facebook business page through the api and displaying them on a tabbed app on the same page – everything works as expected, I get urls to the photos that look like this:
Now if I try and display them like this on the tab app:
<img src="http://photos-f.ak.fbcdn.net/hphotos-ak-snc4/hs689.snc4/ 62916_492131547984_50574932984_6933281_3552549_a.jpg">
Facebook renders it into this:
<img src="http://platform.ak.fbcdn.net/www/app_full_proxy.php? app=167021599978776&v=1&size=o&cksum=f044f3b409714034a653fe22d0d574c0& src=http%3A%2F%2Fphotos-f.ak.fbcdn.net%2Fhphotos-ak-snc4%2Fhs689.snc4%2F 62916_492131547984_50574932984_6933281_3552549_a.jpg">
which displays a broken image (i.e. nothing). Also, I get:
Failed to load resource: the server responded with a status of 403 (Forbidden)
I have a workaround where I call the image from my server, i.e. I have a script
<? $img = $_REQUEST'img'; $data = file_get_contents($img); header('Content-Type: image/jpg'); echo $data; ?>
that I call like so:
where $curr_img is the url to the photo gained from the api call. This works, but I would like to know if anyone has an idea how I can display the image directly without this workaround or if anyone has some insight on the 403 message described above.
Thanks in advance,
If you know photo id then you can use
<fb:photo> FBML tag.