You can't put an iPhoto Library directly on to a NAS.
iPhoto needs to have the Library sitting on disk formatted Mac OS Extended (Journaled). Users with the Library sitting on disks otherwise formatted regularly report issues including, but not limited to, importing, saving edits and sharing the photos.
You can put the Library on any disk or disk image formatted Mac OS Extended (Journaled)
To do this:
Make sure the drive is formatted Mac OS Extended (Journaled)
1. Quit iPhoto
2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
Thereafter any imges you import will be in the Library on the external disk.
Time Machine will not work on a NAS networked drive. It also must be on an OS X Extended (journaled) hard drive.
The following is from this Apple document: AirPort base stations: Time Machine hard drive compatibility
Time Machine can back up your Mac's data to your AirPort Time Capsule, or to an external drive that is formatted as Mac OS Extended. It can also easily use more than one backup disk in OS X Mountain Lion.
Yes you can put the Library on a TC, but two caveats:
1. It shouldn't share the same partition as the TM back ups
2. It needs to be a wired connection. If you're trying to edit the Library (that is, make albums, move photos around, keyword, make books or slideshows etc.) or edit individual photos in it via Wireless be very careful. Dropouts are a common fact of wireless networking, and should one occur while the app is writing to the database then your Library will be damaged. Simply, I would not do this with my Libraries.
But Time Capsule will not back up the iPhoto Library as it's on the same HD, even if its a different partition. TM will backup the MBP's internal HD but not a partition on the TC.
If you don't care about not having a backup of your library you can run the library from the TC with the caveats that TD put forth.