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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:48:57+00:00 2026-06-13T21:48:57+00:00

On my app settings I have as mobile URL this one: https://example.herokuapp.com/mobile.php#&ui-state=dialog However, when

  • 0

On my app settings I have as mobile URL this one:

https://example.herokuapp.com/mobile.php#&ui-state=dialog

However, when I try to access the app from Facebook using a smartphone, Facebook redirects to an OAuth URL for a few milliseconds, and then it redirects to:

https://example.herokuapp.com/?state=63903485c518f2ae5deca667b9a............#_=_

As the /mobile.php is lost, the desktop version is loaded instead.

How can I fix this? Any advice is very much appreciated.

Thank you very much

Edit: piece of security code

try {
    $facebook = new Facebook(array(
            'appId'  => AppInfo::appID(),
            'secret' => AppInfo::appSecret(),
    ));
    $access_token=$_GET['access_token'];
    Log::debug("BaseControl:access token: ". $access_token);
    if(isset($access_token)){
        $facebook->setAccessToken($access_token);
    }
    $user_id = $facebook->getUser();
} catch (Exception $e) {
    exit("Error getting facebook data");
}

if ($user_id) {
    try {
        $basic = $facebook->api('/me');//se necesita access token, si no se tiene falla
    } catch (FacebookApiException $e) {
        if (!$facebook->getUser()) {
            exit("Invalid access token");
        }
    }
    if($basic==null){
        exit("Application not installed");
    }
    $user=UsersLogic::getUser($user_id);
    if($user==null){
        exit("User not registered in database");
    }

}
else{
    exit("No user logged");
}
  • 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-13T21:48:59+00:00Added an answer on June 13, 2026 at 9:48 pm

    Arturo, I would double check that your dashboard settings are correct. Make sure the “Website with Facebook login” section has the correct URL, which in your case, is the mobile one. The tooltip when you hover over the [?] says “URL for your website. For security reasons, we will only redirect to this URL”. Thus, in order to have the correct redirect URL you need to make sure that the URL in that field is the URL you wish the user to redirect to.

    As it says, Facebook will only redirect to that URL for security purposes, so if you have a desktop and mobile version of your app, then you need to have one endpoint to handle the redirect to send the user to the correct page. For your case, it seems like the redirect url is to your root page. What you should do then, is to have some logic in your root page to check the user agent of the incoming request and route appropriately. I would check out http://detectmobilebrowsers.com/ for an open source code snippet to detect mobile browsers. You should put your root page URL in the first field, and the mobile version in the second.

    Let me know if that helps.

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

Sidebar

Related Questions

I have an app.config file, with app settings like this: <appSettings> <add key=setting1 value=1/>
I have created a facebook app on developers.facebook.com and specified a site url for
I'm pulling my hair out with this one... My app is running on jquery-mobile
Anytime i change my in-app-settings (with shared preferences) i have to use the back
I would like some of my preferences to have icons, like the Settings app.
I have some settings in my app.config which I intend to be 'global' -
I have a settings bundle in my iPhone app, with the following PList: Type:
I have an app that has some configuration settings stored in SharedPreference. Now I
i have an app that has a few checkboxes in the settings and then
I have a class library that has settings within an app.config. I know that

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.