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

  • Home
  • SEARCH
  • 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 420079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:50:27+00:00 2026-05-12T18:50:27+00:00

I am using Facebook connect and JS client library to retrieve my photos in

  • 0

I am using Facebook connect and JS client library to retrieve my photos in my Facebook account.

Below is my code:

<div id="photos_pics"></div>
<script type="text/javascript">
    var widget_div = document.getElementById("photos_pics");
    FB.ensureInit(function () {
        FB.Facebook.get_sessionState().waitUntilReady(function() {
            FB.Facebook.apiClient.photos_get('12345678', null, null, function(photos,e) {
                var markup = "";
                for (var i = 0; i < photos.length; i++) {
                    var photo = photos[i];
                    var photo_pid = photo.pid;
                    markup += '<fb:photo size="small" pid="'+photo_pid+'"></fb:photo>';
                }
                widget_div.innerHTML = markup;
                FB.XFBML.Host.parseDomElement(widget_div);
            });
        });
    });
</script>

The below method retrieves the photos:
FB.Facebook.apiClient.photos_get(uid, aid, null, result)

When I only specify uid which is my Facebook id, it works and photos (not in any albums) are returned. But when I specify one of my photo albums in aid, no results returned.

Anyone know what is the error I made? Thanks in advance.

  • 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-12T18:50:27+00:00Added an answer on May 12, 2026 at 6:50 pm

    I have recently been having a significant number of problems with retrieving photos from facebook lately as well. Almost always it is revolving around a recent change they have made to pid’s. When viewing a photo in facebook you will see two query variables in your url pid and aid.

    http://www.facebook.com/home.php#/photo.php?pid=9513212&id=672915455
    

    although this is deceiving because the recent change that facebook made to pid’s is that they are actually in the form id_pid so if I were to include the above photo in an fb photo tag it would look like the following

    <fb:photo size="small" pid="672915455_9513212"></fb:photo>
    

    Although I am having lots of problem with this because in more than one place facebook is being inconsistent with which form of pid it will return or is looking for.

    So my first suggestion is to see which style pid you are receiving and which ones you are trying to use. This is most likely your current problem.

    Your next problem is going to be the fact that there is a current bug in the xfbml version of the fb:photo tag. Currently the tag errors out when parsing the new style tags that have an “_” in them. To get around this we simply made a query for the direct url that facebook uses for the image, and display it using a simple html img tag

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a Facebook iframe/Facebook Connect application with PHP client library. In my index
I am developing chat client which can connect to Gtalk and Facebook.I am using
I implemented Facebook-Connect successfully and I'm able to retrieve User-Information using the Facebook Toolkit.
I'm using Facebook Connect along with the Facebook Graph API to fetch user's email
I am using Facebook Connect for sharing something on my appliction. So I want
I'm using Facebook Connect's Comments Box ( http://wiki.developers.facebook.com/index.php/Comments_Box ) to handle comments on my
I am using Facebook Connect and showing the users Facebook profile pic on the
I am using Facebook Connect with my app. Everything is set up, all the
I am using Facebook Connect . When I click on the Log In button
I'm gleaning from this question [ Facebook Connect Won't Validate that using Facebook Connect

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.