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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:39:09+00:00 2026-05-20T06:39:09+00:00

My application refreshs automatically to facebook login url but my user already signed in

  • 0

My application refreshs automatically to facebook login url but my user already signed in so repeats refresh, nonstop.

Here is my code

$facebook = new Facebook(array(
    'appId'  => 'my app id',
    'secret' => 'my secret key',
    'cookie' => true,
));
$session = $facebook->getSession();
$fbme = null;
$loginUrl = $facebook->getLoginUrl(
    array(
        'canvas'    => 1,
        'fbconnect' => 0,
        'next' => 'my app uri',
        'cancel_url' => 'my app uri',
        'req_perms' => 'email,publish_stream,status_update,offline_access,user_birthday'
    )
);
if (!$session) {
   echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>";
   exit;
}
else {
  try {
      $uid      =   $facebook->getUser();
      $fbme     =   $facebook->api('/me');
  } catch (FacebookApiException $e) {
      echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>";
      exit;
  }
}
function d($d){
return TRUE;
}

And my page’s source in refresh is:

"<script type='text/javascript'>top.location.href = 'facebook login url..';</script>

Always refreshs, non stop.

I looked google and i found p3p policy: header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
added but not working 🙁

Sorry for my bad English.

  • 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-20T06:39:10+00:00Added an answer on May 20, 2026 at 6:39 am

    I guess you need to look at this document:

    Cookies in iframes/P3P Header
    Some browsers will let iframes set cookies
    based on the presence of the P3P
    header. Notably, IE respects this
    header. Ideally you may want to look
    up the right value based on the
    privacy policy adopted by your
    application, but any value will
    usually suffice. The sample
    application sends this for instance:

    P3P: CP="HONK"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When i refresh my flex application, the page does not hold its state and
I have an application in which I am trying to refresh the list after
I'm blocked on a total refresh of my application. I'm using Three20 framework and
How can i refresh the Crystal Reports' report data with C# as desktop application.
in my application I have a few CListCtrl tables. I fill/refresh them with data
I need to add a shake feature that will refresh my Android application. All
Here's what i have : ASP.NET 4.0 Web Application Forms Authentication (Cookie Based) Here's
I have a List in my smalltalk application that gets updated by user events.
Possible Duplicate: Automatically re-direct a user when session Times out or goes idle… I
Here's the deal. I'm trying to make a chat-like application that works with MySQL.

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.