WordPress.org

Plugin Directory

Facebook Page Albums

Get the all albums from Facebook Page by using Facebook Graph API.

  1. Upload facebook-page-albums to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in admin panel.
  3. Go to 'Facebook Page Albums' under Settings menu, and set up for API. you can get the API key from Facebook Developers
  4. Call facebook_page_albums_get_album_list php function in your theme, you can get album list as array.

Example for Album List

<?php
    $list = facebook_page_albums_get_album_list();
?>
    <ol class="album-list">
        <?php foreach ($list as $item) : ?>
            <?php
            if ($item['type'] != 'normal' || $item['name'] == 'Cover Photos') continue;
            ?>
            <li class="album">
                <?php if ($thumb = $item['cover_photo_data']):?>
                <div class="album-thumb">
                    <a href="<?php echo add_query_arg('id', $item['id']);?>">
                        <img src="<?php echo $thumb['picture'];?>"/>
                    </a>
                </div>
                <?php endif; ?>
                <div class="album-info">
                    <h5><a href="<?php echo add_query_arg('id', $item['id']);?>"><?php echo $item['name'];?></a></h5>
                    <div class="counts">
                        <div class="photos-count"><?php echo $item['count'];?></div>
                        <?php if (!empty($thumb['comments'])) :?><div class="comments-count"><?php echo count($thumb['comments']['data']);?></div><?php endif;?>
                        <?php if (!empty($thumb['likes'])) :?><div class="likes-count"><?php echo count($thumb['likes']['data']);?></div><?php endif;?>
                    </div>
                </div>
            </li>
        <?php endforeach;?>
    </ol>

Requires: 3.2 or higher
Compatible up to: 4.0.1
Last Updated: 2014-9-11
Active Installs: 600+

Ratings

5 out of 5 stars

Support

0 of 2 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1