dejanstojanovic / Facebook-Album-Browser

jQuery plugin for browsing public albums of a Facebook account
http://dejanstojanovic.github.io/Facebook-Album-Browser/
MIT License
74 stars 42 forks source link

image resolution #33

Closed timracer closed 8 years ago

timracer commented 8 years ago

How to change link to photo? Cause it's not in full resolution. I opened photo via facebook account and link was [https://scontent.xx.fbcdn.net/hphotos-xfp1/t31.0-8/11894415_142201052791249_2462838957330698595_o.jpg] but plugin opens photo like that [https://fbcdn-photos-d-a.akamaihd.net/hphotos-ak-xfp1/t31.0-0/p480x480/11894415_142201052791249_2462838957330698595_o.jpg]. It is not the same resolution. Plugin thumb image link is [https://fbcdn-photos-d-a.akamaihd.net/hphotos-ak-xfl1/v/t1.0-0/p130x130/11959959_142201052791249_2462838957330698595_n.jpg?oh=4b3d65c20143300a78679da6e3ad9903&oe=56694DA0&__gda__=1450735549_4862cc3341cbcfd97d6cbee0f8c7f86c]. It is so tiny (130x130)... How can I change all plugin links (image-thumb, full image, album cover image and etc) to one link which will always direct to full resolution image? Like that [https://scontent.xx.fbcdn.net/hphotos-xfp1/t31.0-8/11894415_142201052791249_2462838957330698595_o.jpg]

timracer commented 8 years ago

solved)

dchicon commented 8 years ago

How did you solved? Thanks

Enviado desde mi iPhone

El 9/9/2015, a las 7:44, timracer notifications@github.com escribió:

solved)

— Reply to this email directly or view it on GitHub.

timracer commented 8 years ago

just comment this

for (i = 0; i < $(cover.images).length; i++) { if ( ($(cover.images)[i].height >= prefHeight && $(cover.images)[i].width >= prefWidth) && ($(cover.images)[i].height <= albumImg.height && $(cover.images)[i].width <= albumImg.width) ) { albumImg = $(cover.images)[i]; }

and this

for (i = 0; i < $(result.data)[a].images.length; i++) { if ( ($(result.data)[a].images[i].height >= prefHeight && $(result.data)[a].images[i].width >= prefWidth) && ($(result.data)[a].images[i].height <= albumImg.height && $(result.data)[a].images[i].width <= albumImg.width) ) { albumImg = $(result.data)[a].images[i]; } }

timracer commented 8 years ago

but I still cannot get image in full resolution into lightbox :(

dejanstojanovic commented 8 years ago

Debug traffic in your browser with Firebug. You will see the response of the Facebook API. Check the URLs in JSON the response for images and if it is provided by API than it will be there. If it is there just rename tr property in code for lightbox. Let me know if this was helpful for you

timracer commented 8 years ago

ok, I will try

timracer commented 8 years ago

nothing) I guess I couldn't solve it

timracer commented 8 years ago

And I want to try to use this https://github.com/brutaldesign/swipebox instead of lightbox. According to me it will seems so elegant with your great plugin

dejanstojanovic commented 8 years ago

Should not be that hard to add it. I created this lightbox behavior as I did not want to import some existing plugin and make it to heavy :)

timracer commented 8 years ago

Anyway your plugin is very helpful and useful to much people and me!

timracer commented 8 years ago

Hi @dejanstojanovic! I cannot change image resolution to full resolution into lightbox.

in html structure

a href="https://fbcdn-photos-f-a.akamaihd.net/hphotos-ak-xpf1/t31.0-0/p480x480/11224645_142112549466766_7606228923777598231_o.jpg"

but

img src="https://scontent.xx.fbcdn.net/hphotos-xpf1/t31.0-8/11224645_142112549466766_7606228923777598231_o.jpg"

So thats why lightbox opens 480px image (/p480x480 in the middle of the link). Tell me please how to change <-a-> link?

dejanstojanovic commented 8 years ago

Check method loadPhotos, it loops through images attached to photo. Add a simple condition which will find the largest image (check width and height of the returned object) and use the source property. Please check this and let me know if you managed to do anything. I'm currently a bit busy, so I cannot be more specific where exactly to make the change to make it work :(

timracer commented 8 years ago

ok

dejanstojanovic commented 8 years ago

I saw you closed the issue. Did you find the solution?

timracer commented 8 years ago

I didn't