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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:02:59+00:00 2026-05-18T05:02:59+00:00

Summary: How do I configure my facebook application to request additional information from the

  • 0

Summary:

How do I configure my facebook application to request additional information from the user.

The detail:

I decided recently to try to write a facebook application. The idea behind the graph api seemed a good one and I hoped it would be straightforward. Big mistake!

I’ve managed to cobble the following together which successfully retrieves the publicly available info about me:

// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
  'appId'  => '*****',
  'secret' => '*****',
  'cookie' => true,
));

// Read session info from Facebook object above
$session = $facebook->getSession();

$me = null;
$myfriends = null;
$myalbums = null;
$myphotos = null;

// If logged in ok, load data into php objects for use in page
if ($session) {
  try {
    $uid = $facebook->getUser();
    $me = $facebook->api('/me'); // infor about logged in person
    $myfriends = $facebook->api('/me/friends'); // list of their friends and associated ids
    $myphotos = $facebook->api('/me/photos'); // photos I've loaded or am tagged in -     requires permissions!
    $myalbums = $facebook->api('/me/albums');// Albums I've created - requires permissions!
} catch (FacebookApiException $e) {
    error_log($e);
  }
}

However, it can’t get hold of my albums and photos because they require special permissions to be granted by the user. My problem is I can’t see any settings in the facebook based application setup which would do this.

Can you help??

  • 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-18T05:03:00+00:00Added an answer on May 18, 2026 at 5:03 am

    Append the following code to yours. You need to set $url to be the URL of your facebook application, and adjust ‘req_perms’ based on your needs.

    if(!$session) {
        $url = $facebook->getLoginUrl(array('req_perms'=>'email,publish_stream', 'next'=>$returnUrl));
        echo <<<EOD
    <html>
    <head>
    <script type="text/javascript">function redirect(){ top.location.href = "$url"; }</script>
    </head>
    <body onload="redirect();">Please wait...</body>
    </html>
    EOD;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Summary: I'm developing a persistent Java web application, and I need to make sure
Summary: I'm trying to write a text string to a column of type varchar(max)
SUMMARY: How to configure a web service such that writing to the Event Log
When i try to configure security through the admin console of Websphere it just
How do I configure the appropriate Git hook to send a summary email whenever
Summary Hi All, OK, further into my adventures with custom controls... In summary, here
Summary What's the best way to ensure a table cell cannot be less than
SUMMARY: When browsing an ASP.NET website using Windows Explorer, popup windows do not borrow
Summary: Can I program a thick client game in C without reinventing wheels ,
Summary: I'm able to compile a RAD Studio 2009 project using MSBuild on a

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.