Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6684513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:56:56+00:00 2026-05-26T04:56:56+00:00

I’ve manage a martial arts school’s website, the schook also has a facebook group

  • 0

I’ve manage a martial arts school’s website, the schook also has a facebook group where friends and students can publish their news and photos.

I would like to fetch the group’s albums and display their pictures in the website of the school.

So I tried this short script:

<?php
require_once(__DIR__.'/lib/facebook.php');
$facebook = new Facebook(array(
  'appId'  => 'API_KEY',
  'secret' => 'API_SECRET',
));

$group = $facebook->api('GROUP_ID');
echo $group
?>

Which is raising this error in the app’s log

Wed Aug 10 01:16:30 2011] [error] [client 127.0.0.1] PHP Fatal error:
Uncaught CurlException: 6: name lookup timed out\n thrown in
‘./lib/base_facebook.php on line 814

So I wonder if this is the way to do it or if I should try getting the albums from elsewhere…

I find the documentation in developers.facebook.com scarce or confusing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:56:56+00:00Added an answer on May 26, 2026 at 4:56 am

    This is how I get my albums, I think the group album must be similar.

    1. create a Facebook application. If you don’t already have one usable for this project create it on http://developers.facebook.com/setup/. You will own App Name, App URL, App ID, and App Secret get access code, go to:

      https://www.facebook.com/dialog/oauth?client_id=Your_App_ID&redirect_uri=Your_App_URL&scope=read_stream,publish_stream,offline_access

      You must allow the application to gain access to your account. (allow access to pictures to)
      After you click allow, your browser will be redirect to Your_App_URL with additional URL attribute, it will look something like:

      Your_App_URL?code=long_facebook_code

    2. get offline access token, go to

      https://graph.facebook.com/oauth/access_token?client_id=Your_App_ID&redirect_uri=Your_App_URL&client_secret=Your_App_Secret&code=long_facebook_code

      the page will display something like

      access_token=123456789|99bdea74e40ecc75530b7c45-132456798|dTntC8lVyR84eBxK1TS9ws2s_s0

      Note: make sure there are no word “expire=” in the end of the token (the bold text)
      copy your offline token (only the bold text) and use it, it permanent token and never change event if you change your application name.

    3. then I use a script in PHP (PHP SDK 3.0.):

      require 'src/facebook.php';
      $appId = 'Your_App_ID';
      $secret = 'Your_App_Secret';
      $access_token = 'Your_access_token';
      $facebook = new Facebook(array('appId' => $appId, 'secret' => $secret, ));
      $facebook->setAccessToken($access_token);
    

    to see available albums:

    // bring the id, name and number of pictures.
    $albums = $facebook->api('/me/albums?fields=name,count'); 
    print_r ($albums);
    

    to read the album:

    $album_ID = "123456..."; //album ID
    $list_pictures = $facebook->api('/'.$album_ID.'/photos', array('access_token' => $access_token));
    print_r ($list_pictures);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
In my XML file chapters tag has more chapter tag.i need to display chapters
I have an array which has BIG numbers and small numbers in it. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.