Facebook View Photo in Album

By znerp Last update Mar 20, 2010 — Installed 1,110,323 times.

Script Summary: Adds a link above photos to see them in their albums, even if you're not friends with the photographer. Adds links to view all photos of a user together (regardless of who took them). Adds links to view whole galleries/albums on one page.

Explanation of how the script works.

When viewing photos of a friend, and you come across one that has been taken by someone who you're not friends with, you will be unable to view the album that it is in.

This script will add a link above such photos that says "See this Photo in its Album". Clicking this link will reload the photo, but you'll be viewing it in the album that you couldn't view.

When you're viewing a photo that is in an album like this, the script will now add a link above the photo that says "Back to Album". This will remove the photo from the page and load a thumbnail gallery of all photos in the album (up to the capacity of 60 photos, not the usual 20-per-page deal that facebook does). The load time for this can be very slow.

When viewing all photos of a user, on the page that shows photos of them and their albums etc., a link is added at the top to view all photos of them on one page.

This script however cannot get around Facebook's security, so you will not be able to view photos that you can't otherwise view.

View All Photos

When viewing a photo album or a photo gallery (or any page of images), when there are previous or next pages, a link is added to view all the images on the one page. The load time can be slow if there are several hundred photos, so be patient. The full page of photos is also compatible with my other script inYOf4cebook.

Any comments, suggestions or bugs, please leave details in the comments.



For users of this script who want to be kept up-to-date with updates to it, I recommend using the Script Updater script. I've not added an auto-checker on this script by default because I believe users shouldn't be bugged to update scripts, but I personally use this one above.

Update Log

31-May-2007: Initial Release.
1-June-2007: Minor bug fix.
26-September-2007: Minor change, shouldn't affect functionality but might iron out any bugs.
4-October-2007: Galleries taken by people you don't know can now be viewed, although load times are very poor.
12-October-2007: Minor changes to code. Also, now thumbnails images have titles which will dasplay on mouseover.
9-December-2007: Minor change in the code so that "Back to Album" link now shows on all relevant photo pages.
11-January-2008: A few cosmetic changes made.
13-January-2008: A link is now added on main photo pages for users (above photos added by that user and added by others) to view all these photos together.
14-January-2008: Added 'View All Photos' functionality. (See details above).
16-January-2008: Added ability to stop photos from loading in 'View All Photos' functionality.
18-January-2008: Minor bug fix; "View All Photos" text no longer shows on individual photos.
25-February-2008: Now links to a photo you can view instead of albums you can't when viewing all albums with a friend in. When viewing that photo, you can then view the whole album.
25-February-2008: Small further change to remove a stupid condition I accidentally left in. Should work fine now.
5-May-2008: "View all photos" now fixed to work when viewing > 1000 photos.
12-May-2008: Some privacy setting stop this script from working, so I've now changed it to tell the user when it isn't working.
14-May-2008: A few minor changes to restore some functionality lost due to recent facebook changes.
26-May-2008: Fixed bug as pointed out by Dan Cooper.
30-May-2008: Fixed bug as pointed out by tulipcorp.
3-June-2008: Bug fixed whereby when selecting "View all photos" and not on the first page of a set, the photos didn't display correctly.
23-July-2008: Full functionality should restored from facebook changes in mid-May.
25-July-2008: Fixed for new facebook changes.
23-September-2008: Some changes to attempt to restore functionality lost due to new Facebook.
29-October-2008: Fixed so that "View All Photos" link will now work when viewing all photos of a friend. Thanks to Martin Stone for the heads up on how to do this.
17-December-2008: Fixed for viewing all photos of a user.
18-December-2008: Finished fix from yesterday. I somehow managed to upload the wrong version.
17-March-2009: Fixed due to Facebook changes.
31-March-2009: Now shows page 2 when viewing all photos of someone.
31-March-2009 (a little later..): Now works for photos added to groups.
8-April-2009: Finally fixed the Page 2 issue (see this discussion). I believe I've seen the back of this problem now.
25 July 2009: Fixed for Vanity URLs.
1 August 2009: Some minor tweaking, thanks again to Martin Stone for the suggestions.
15-November-2009: Fixed for Facebook changes.
2-Jan-2010: Fixed for viewing photos of people.
20-March-2010: Fixed for viewing all photos. I don't think this is 100% though, so please let me know if there are any more problems.