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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:49:51+00:00 2026-06-01T01:49:51+00:00

I have createn an app, this app can be found here Everything is working

  • 0

I have createn an app, this app can be found here

Everything is working as should be apart fromt when someone uses the app for the first time. It produces the dialog to allow the user to see what type or permission I have requested using this –

$url = $facebook->getLoginUrl(array(
'canvas' => 1,
'req_perms' => 'publish_stream, email, offline_access',
'fbconnect' => 0
));

Once the user click OK they are then redirected to the URL where my app sits, instead of redirecting to the URL of the app within Facebook.

Other code I have that works with this app –

include_once("includes/src/facebook.php");
include_once("includes/src/facebook_config.php");
$facebook = new Facebook(array(
'appId'  => FACEBOOK_APP_ID,
'secret' => FACEBOOK_SECRET_KEY,
'cookie' => false,
'domain' => 'syncro-it.co.uk'
));


<div id="fb-root"></div>
        <script>
        window.fbAsyncInit = function() {
        FB.init({
            appId  : '<?=FACEBOOK_APP_ID?>',
            status : true, // check login status
            cookie : true, // enable cookies to allow the server to access the session
            xfbml  : true  // parse XFBML
        });
        FB.Canvas.setSize();
        };

        (function() {
        var e = document.createElement('script');
        e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
        }());
        </script>

Has anyone come across this before? If so am I missing somethign silly?

  • 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-06-01T01:49:53+00:00Added an answer on June 1, 2026 at 1:49 am

    Try this :

    <?
      // Remember to copy files from the SDK's src/ directory to a
      // directory in your application on the server, such as php-sdk/
      require_once('facebook.php');
    
      $config = array(
        'appId' => '2XXXXXXXXXXXX36',
        'secret' => 'XXXXXXXXXXXXXXXX43d18d86f157d',
        'fileUpload' => true,
      );
    
      $facebook = new Facebook($config);
      $user_id = $facebook->getUser();
    if($user_id) {
        try {
            $user_profile = $facebook->api('/me','GET');
                    echo $user_profile['birthday'];
                         //----------------------------------
                         //PUSH UR CODE HERE
                         //----------------------------------
        } 
    catch(FacebookApiException $e) 
    {
            $login_url = $facebook->getLoginUrl( array(
           'scope' => 'user_birthday'
            )); 
    echo "<script type='text/javascript'>top.location.href = '$login_url';</script>";
    exit;
    }
    }
    else
    {
            $login_url = $facebook->getLoginUrl( array(
                           'scope' => 'user_birthday'
                         )); 
        echo "<script type='text/javascript'>top.location.href = '$login_url';                     </script>";
                    exit;
            }
        ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm soon to launch a beta app and this have the option to create
Currently I have this code var App = Ember.Application.create(); App.user = Ember.Object.create({ people: customers
I have a flex app which allows user to create some content. this content
I have created an App Widget for Android 1.5. It uses a TextView to
I have created an app that uses NSTimer, which gets triggered each second. My
Still wresting with GWT and App Engine, and I have come to this problem:
I have this app, originally written for iOS 2.x. I recently needed to add
i have come into quite a funny hole here. i can't seem to be
I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process
I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process

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.