You are not logged in. Please log in and try again

44,972

Solution 1

I had the exact same problem which popped up last few days or so. I fixed it by generating the respective platforms in the app's settings. Note that I only had the general settings before and it worked, but something probably been changed recently.

  1. Go to he settings section of your app in Facebook (Facebook developers > My Apps then Settings)
  2. Under the Basics make sure you have the respective platform. If you do and it is still not working, then remove and recreate it. Otherwise, click on [+ Add Platform] and follow the instructions. For example, for Android you need to provide: a) Your package id b) Your launcher activity full name c) Key hash - which you need to generate as per instructions using keytool and openssl

good luck!

Solution 2

I have solved this by using replace the redirect URL: http://localhost/callback

For more info visit: http://ngcordova.com/docs/plugins/oauth/

Solution 3

well, in my case i have not made the app public . go to app review part of your app and turn "Make your app public?" to yes . try it worked for me

Solution 4

All my research efforts lead me to this thread. What did the trick in my case was adding this:

https://www.facebook.com/connect/login_success.html

to the Valid OAuth redirect URIs in the facebook login settings.

Share:
44,972
immayankmodi
Author by

immayankmodi

Mayank is a web developer and designer who specializes in back-end as well as front-end development using Asp.net, MVC, .Net core, C#, SQL, JavaScript/jQuery, HTML/CSS and many more. Full Stack developer at Upwork and Fiverr with 5 star ratings and 100% job success score. He's passionate about programming and can face any technical challenges which becomes obstacle in his carrier path. He wrote up millions of lines of code in hundreds of projects using various technologies and still counting. He treat every bug as a friend which makes him different from other developers and encourage him to never give up and helps to learn new things. He's the Founder and Chief Editor at AspnetO tech community blog where he shares some informative tutorials.

Updated on December 22, 2020

Comments

  • immayankmodi
    immayankmodi over 3 years

    I'm using phonegap facebook connect plugin (https://github.com/Wizcorp/phonegap-facebook-plugin) for Facebook Authentication in app. It was working till today morning. Now suddenly it stops working and gives error as below for different devices iOS & Android:

    For Android:

    You are not logged in. You are not logged in. Please log in and try again.

    For iOS:

    Given URL is not allowed by the application configuration: One or more of the given URL is not allowed by the App’s settings. To use this URL you must add a valid native platform in your App’s settings

    I'm using following code in config.xml:

    <gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.9.0">    
         <param name="APP_ID" value="99885XXXXXXXXX" />
         <param name="APP_NAME" value="Test App" />
    </gap:plugin>
    

    facebook call:

    function fbLogin() {
            facebookConnectPlugin.login(
            ["public_profile", "email"],
            function (response) {
                var OAuthToken = response.authResponse.accessToken;
                var OAuthAccessToken = response.authResponse.userID;
                if (response.authResponse) {
                    facebookConnectPlugin.api('/me', null,
                        function (me_response) {
                            alert("Success: " + me_response);
                            facebookConnectPlugin.logout(function (response) {}, function (response) {});                            
                        });
                }                
            },
            function (response) {                
                alert("Error: " + me_response);
            }
        );
    }
    

    Don't know what is the issue here.