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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:36:02+00:00 2026-05-25T09:36:02+00:00

I am new to facebook applications and I am using the example code in

  • 0

I am new to facebook applications and I am using the example code in facebook’s php jdk for testing. Although I got the username,first name etc I am not getting the email or birthday information . I searched in this forum How to get Users Email Id in Facebook application using PHP? and added the extra line 'req_perms' =>'email,user_birthday,publish_stream' but the result is same . I am sending you the codes :

public function getLoginUrl($params=array()) {
    $this->establishCSRFTokenState();
    $currentUrl = $this->getCurrentUrl();
    return $this->getUrl(
      'www',
      'dialog/oauth',
      array_merge(array(
                    'client_id' => $this->getAppId(),
                    'req_perms' =>'email,user_birthday,publish_stream',
                    'redirect_uri' => $currentUrl, // possibly overwritten
                    'state' => $this->state),
                  $params));
  /**
   * Get a Logout URL suitable for use with redirects.
   *
   * The parameters:
   * - next: the url to go to after a successful logout
   *
   * @param array $params Provide custom parameters
   * @return string The URL for the logout flow
   */
  public function getLogoutUrl($params=array()) {
    return $this->getUrl(
      'www',
      'logout.php',
      array_merge(array(
        'next' => $this->getCurrentUrl(),
        'access_token' => $this->getAccessToken(),
      ), $params)
    );
  }

And in index.php I retrieve e-mail

echo "E-mail".$user_profile['email']."<br />";
  • 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-25T09:36:02+00:00Added an answer on May 25, 2026 at 9:36 am

    You have changed the facebook sdk library. You have edited the code of facebook.php. There is no need to edit the code of facebook library. Just remove the parameter from facebook library:

    'req_perms' =>'email,user_birthday,publish_stream',
    

    You have to use this parameter here:

    $loginUrl = $facebook->getLoginUrl(array('canvas' => 1,
                                      'fbconnect' => 0,
                                      'scope' => 'email,user_birthday,publish_stream',
                                      'next' => CANVAS_PAGE,
                                      'cancel_url' => CANVAS_PAGE ));
    

    Changed the req_perms to scope. Now it will be working fine

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

Sidebar

Related Questions

I'm trying to setup a new facebook app using the example from Facebook but
how to develop new facebook application (login , add photos ) using the api
Running the example code for the Facebook API I get a null session object,
I have really simple few lines of Facebook app, using the new Facebook API:
I am developing a Facebook Iframe application using PHP which opens an RSS feed
Does anyone have experience writing a Facebook application using GWT with GAE? I'm new
How do I like a page using the new Facebook iOS SDK? (http://github.com/facebook/facebook-ios-sdk) I'm
I am using the following PHP code to post to my page wall. it
I have been looking into using Facebook Connect for a new web site I
I'm trying to implement the 1.6 Mobile Facebook API ( http://code.google.com/p/facebook-actionscript-api/downloads/detail?name=GraphAPI_Mobile_1_6.swc ) into an

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.