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 4626472
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:25:32+00:00 2026-05-22T03:25:32+00:00

I want to develop an app in php that I can link with a

  • 0

I want to develop an app in php that I can link with a particular photo album in my Facebook profile (or with all my photos) in order to know the direct url link of each photo.

The idea is to make an php script who shows in chronological order my facebook photos like a presentation. Im php programmer, but I know nothing about Facebook integration API. So guys if you can suggest me ways to do this it will be nice. Sorry for my English. Thanks!

  • 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-22T03:25:33+00:00Added an answer on May 22, 2026 at 3:25 am

    here is a class for retriving specific user profile pictures (PHP), you’ll get the idea from it to create what you want:

    <?php
    
    class FBPicture {
        public $uid;
        public $dir;
        public $type = 'large';
    
        public function setUId ($id) {
            $this->uid = $id;
        }
    
        public function setDir ($dir) {
            $this->dir = $dir;
        }
    
        public function fetch ($_uid=null, $_dir=null, $_type=null) {
            if ($_uid === null)
                throw new CHttpException ('Facebook User ID or Username is not set.');
            if ($_dir === null)
                $_dir = '/storage/';
            if ($_type === null)
                $_type = 'large';
    
            $this->uid = $_uid;
            $this->dir = $_dir;
            $this->type = $_type;
    
            $dir = getcwd () . $this->dir;
            $type = $this->type;
    
            // request URI
            $host = 'http://graph.facebook.com/' . $_uid;
            $request = '/picture';
            $type = '?type=' . $type;
    
            $contents = file_get_contents ($host.$request.$type);
    
            // create the file (check existance);
            $file = 'fb_' . $uid . '_' . rand (0, 9999);
            $ext = '.jpg';
    
            if (file_exists ($dir)) {
                if (file_exists ($dir.$file.$ext)) {
                    $file .= $dir.$file.'2'.$ext;
    
                    if ($this->appendToFile ($file, $contents)) {
                        return str_replace ($dir, '', $file);
                    }
                } else {
                    $file = $dir.$file.$ext;
                    touch ($file);
    
                    if ($this->appendToFile ($file, $contents)) {
                        return str_replace ($dir, '', $file);
                    }
                }
            } else {
                // false is returned if directory doesn't exist
                return false;
            }
        }
    
        private function appendToFile ($file, $contents) {
            $fp = fopen ($file, 'w');
            $retVal = fwrite ($fp, $contents);
            fclose ($fp);
    
            return $retVal;
        }
    }
    
    // sample usage:
    // $pic will be the filename of the saved file...
    $pic = FBPicture::fetch('zuck', 'uploads/', 'large'); // get a large photo of Mark Zuckerberg, and save it in the "uploads/" directory
    // this will request the graph url: http://graph.facebook.com/zuck/picture?type=large
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop an app that can download a load of data at
want to develop an app that can automatically respond to a received text, include
I want to develop an enterprise app that includes a WindowsForms presentation layer, middle-tier
I want to deveplop an app for Windows Mobile 5.0 and above that can
I want to develop a mobile web application using asp.net 3.5 that can be
I want to develop an app that gives a random quote every time you
I want to develop an Java application that can detect the user logged on
If I want to develop php app in linux , which version of linux
I want to develop an iPhone app that read data from the internet but
I want to develop an app based on the image in which thumbnails can

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.