1

Hello I'm making a website, and I want the albums and photos from a facebook page to be shown in a box.

Here is an example
I want the albums and photos to be shown just like this, in a slide, instead of finding the it automatically takes the photos from any decided album. Example page

Here is the code used in the example page, this takes random pictures stored in a folder and displays them, same method should be used for the facebook album. This is where I'm stuck.

The code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>*title*</title>

<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="scripts/jquery.cycle.all.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#myslides').cycle({
    fit: 1, pause: 2, timeout: 200
});
});
</script>
<link rel="stylesheet" href="styles/dynamicslides.css" type="text/css" media="screen" />
</head>
<body>

<?php
$directory = 'images/slideshow/';   
try {       
// Styling for images   
echo "<div id=\"myslides\">";   
foreach ( new DirectoryIterator($directory) as $item ) {            
    if ($item->isFile()) {
        $path = $directory . "/" . $item;   
        echo "<img src=\"" . $path . "\" />";   
    }
}   
echo "</div>";
}   
catch(Exception $e) {
echo 'No images found for this slideshow.<br />';   
}
?>
</body>
</html>

Hope you understand what I'm trying to say here :)

I have little knowledge about this, so be easy one me. Sorry for my bad English.

Remi
  • 75
  • 1
  • 2
  • 13
  • I'm not sure what you're asking. Where are you having problems exactly? Why do you want to do it yourself when there are literally hundreds of ready-made solutions? – JJJ Apr 02 '12 at 06:51
  • I've been trying to search around the web, haven't stumbled upon anything that I could use, seems like you have though, if there already are good enough templates that I can use then lead the way :) – Remi Apr 02 '12 at 06:52
  • Look for pagination scripts in for example PHP or Javascript (with jQuery). Other than that, all you need to do, is fetch all images from a certain FB page. – mat Apr 02 '12 at 07:09

1 Answers1

0

From what i have understood

Give a name tag to each of the photos in an album.. when u click on one album all you need to do is run the a loop for that name tag.

If this doesn't suffice, explain your problem clearly. Some code will actually help understand the problem better

nandu
  • 779
  • 4
  • 18
  • Changed the whole topic, hope it makes more sense now :) – Remi Apr 02 '12 at 07:48
  • 1
    I still am not clear of what you want.. if you are trying to fetch the images of Facebook just use the api .. It is already explained here http://stackoverflow.com/questions/5829477/how-can-i-integrate-facebook-photo-album-into-website if you are trying to make use of jquery cycle , the following example can be used : http://jquery.malsup.com/cycle/begin.html but if you are trying to get all the Facebook photos and then using it .. you can prefetch all the images using javascript and once its done u can add it to your#myslides in your example – nandu Apr 02 '12 at 08:47