Facebook API login error - facebook

When I'm trying to log in with my facebook button on asp page (jdk) I'm getting this error:
App Not Setup: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions.
I've tried so many solutions available online, but its not working.
So, my login java script is "http://localhost:8003/en/user/login/".
The things that I set on the facebook app are: contact mail, site url:"http://localhost:8003/"
Valid OAuth redirect URIs "http://localhost:8003/".
I have set option "Do you want to make this app and all its live features available to the general public?" to yes.
Does anyone have any idea why it isn't working?

So i made it work. I feel ashamed that it took me soo long to figure it out.
Just had to put javascript for FB login in master page and it is available everywhere on website and localhost:port/ work as valid Valid OAuth redirect URI.

Related

Can't get Advanced Access to public_profile on a disabled app?

Last night Facebook disabled our app with the following justificative:
Developer Policy 6.1: Verify that you have integrated Login correctly. Your app shouldn't crash or hang during the testing process.
During Login, your app is crashing or hanging excessively, creating a broken experience for people trying to use your app. To make sure this flow runs smoothly, check that you've integrated Facebook Login correctly. We recommend that you test Login on all integrations. If you have not already done so, please:
• Here's our quickstart guide for implementing Facebook Login for Android: https://developers.facebook.com/docs/facebook-login/android
• We encourage you to test your Login integration following these steps here: https://developers.facebook.com/docs/facebook-login/testing-your-login-flow/
• Best Practices for Login can be found here: https://developers.facebook.com/docs/facebook-login/best-practices
After going through the app options for Facebook Login, I found out that our public_profile permission is in "Standard Access." To allow our users to use Facebook Login, I will need to upgrade to "Advanced Access."
The documentation says that "Business apps created before February 16, 2021, were automatically approved for Advanced Access for the email and public_profile." I should be able to move our public_profile permission to "Advanced Access" because our app was created way before 2021. The problem is that after I click on the "Get Advanced Access" button and type my password, the page reloads, and the public_profile permission is still on the "Standard Access" mode.
So, these are my questions: what I am doing wrong? Is my app unable to upgrade our permissions to "Advanced Access" while being in this "Disabled" state? How can I debug my app to make it work again?
Some additional info about my app:
It passed through the Facebook App Review in 2019, and we already got permission to manage Pages and read connected Instagram accounts;
Everything was working fine until Facebook warned us that our Login integration was not working correctly;
In response to the Facebook notification and before Facebook disabled our app, we enabled the "Login with the JavaScript SDK" and updated the "Allowed Domains for the JavaScript SDK" (such as "https://www.example.com/").
I can't switch back our app to "Dev Mode" because the option is not showing up (is it due to being "Disabled"?)
For anyone landing here from google: I had the same issue, it is a brand new Facebook app, it's not blocked nor disabled. I needed to enable login through Facebook, thus needing advanced access to public_profile. When I tried that, it sometimes asked for my FB password, sometimes not, but it did nothing. There were no errors in the javascript console in the browser, nor any failed requests. I managed to make it work by simply waiting 10-30 seconds after each click (Request advanced access -> wait -> check the box -> wait -> write password -> click submit) to let the JS in the browser finish whatever was going on and then click the next button etc.
I discovered that it is not possible to modify your permission settings while your app is blocked.
I recovered my app using the appeal form, saying that I can't correct it while it is blocked because I need to change the permission settings. In case anyone needs an example, this was the exact text I sent to Facebook on the appeal form:
To get our app into compliance, we still need to upgrade our
permissions from "Standard Mode" to "Advanced Mode", but we can't do
this while our app is disabled. I would like to ask Facebook for an
Extension of the deadline and to re-enable our app, to allow our team
to change the permissions to "Advanced Mode" and properly test and get
our app into compliance. In case it is not possible to make an
extension to the deadline, we ask Facebook to revoke all permissions
given through the App Review process and then re-enable our app, in
Dev Mode. This way, we would be able to make all the required changes,
properly test our app, and submit it again to the App Review.
for me it was not possible to get a reply from facebook with the text of #lgfischer. All the time only chatbots answered. After 2 weeks of writing we decided to remove the facebook login from the app.
the end result is: no more facebook login in our app. 😁 thanks to all facebook chatbots and to the intelligent metaverse. ;-)
I had the same issue, it is a brand new Facebook app, it's not blocked nor disabled. I needed to enable login through Facebook. It asked me to enable advanced access to public profile setting When I tried that, it sometimes asked for my FB password, sometimes not, but it did nothing.
There was no errors, the setting was just not turning on to advanced. this problem was faced by some others too, who have posted their answers under this same topic
I have been able to access the advanced setting now.
All I had done was change from brave browser (Tried with chrome also, but didn't work) to Mozilla Firefox
It just worked like magic. make sure you enter the right password for that account.
If this helps, hit an Upvote. or comment your experience below

Using Facebook Authentication

In my Angular2 app I have used the following code:
loginfb() {
this.afAuth.auth.signInWithPopup(new firebase.auth.FacebookAuthProvider());
}
But the problem is I am getting an error App Not Set Up: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions.
So I went to Facebook developers, created an app, added the Facebook Login product, went to the product's settings and set the Valid OAuth redirect URIs with the URI given in the firebase console.
But even then when I am trying to login, I am facing the same error.
Any help would be greatly appreciated. Thanks.
This error comes when your app is not live.There are a bunch of possible things which could trigger this error.I am not sure and as you are getting error "you don't have access to it",may be you are trying to login through your test version of the Facebook app and you may have not added the user Roles as Testers in Roles section and the you have to add the email address of the Facebook account you are trying to login in setting section.
Then ,make sure that the user you added accepts the request sent before you try to test otherwise it will fail.
And for error "Switch to a registered test user or ask an app admin for permissions."
When you create new app on Facebook, its by default only visible to you and not to public and others won't be able to use it for social login and they will get this error. You may have to go to Go to your Facebook app's dashboard, Select the "Status and Review" tab and set YES or ON.
You can find similar question and answer is there in this link App Not Set Up.and
This app is still in development mode

Has anyone actually got ASP.NET MVC 5 Identity Facebook logins to work out of the box? (loginInfo always returns null)

Using Visual Studio 2013 Update 5, I have created a boilerplate MVC 5 application with Individual User Accounts auth option selected, and I have been trying to implement social logins using the template code, but have been unsuccessful.
I have ensured all NuGet packages are up to date, and the code is using MVC 5.2.3; Owin 3.0.1; AspNet.Identity 2.0.0.
I can get everything working fine, including authenticator apps using OtpSharp, but the Facebook login is just not working whatever I try.
I have created the Facebook App, set all the relevant options on that and set the AppId and AppSecret in my Startup.Auth.cs file.
When I try to login with Facebook, the MVC site redirects me to Facebook, which prompts me with the auth screen for the app. I click OK and accept this then I am redirected back to the MVC app. If I check the authorised apps under my Facebook account, my app is listed and shows that it has granted permission to the app to retrieve email address.
The callback works fine but when it hits ExternalLoginCallback and in particular:
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync()
loginInfo always returns null.
Looking at the Request it shows an error of access_denied:
https://localhost:44301/Account/ExternalLoginCallback?ReturnUrl=%2Fmanage&error=access_denied
I have read pretty much every blog post and SO question on this error and whilst most of them are helpful, most are also out of date and not relevant.
It would seem that something is missing from the templated project, or something has changed elsewhere as no matter which tutorial I read, and options I set, the result is the same.
I have tried this internally on a dev machine running IIS Express and externally on a hosted machine running IIS 7.5 too and the results are the same.
I've even decompiled the Microsoft.Owin.Security.Facebook library to see where that particular section of the querystring is set to no help.
If I had any hair I'd have pulled it all out by now.
I'll take any suggestions. Can anyone help?
Facebook loves to make things difficult. Access_denied sounds like they are blocking you on purpose. Check your developer dashboard and the accounts authorized to test your app while its in development mode. The email permission is approved by default, so that isn't your issue.
Make sure the account you are testing with is added here:
If that doesnt solve it, make sure you have the correct app domains (testing and live) listed in the domain section here:
I had the exact same issue. No matter what I did the facebook would show the login, get permissions and then return back to the Login page instead of the Email confirmation page.
Using Fiddler Facebook would invoke "http://localhost:1234/signin-facebook&code=SOME_SECRET_CODE_HERE", and then my application's controller would invoke "http://localhost:1234/ExternalLoginCallback?error=access_denied". I was sure Facebook is refusing the access. It was only after implementing a Facebook Javascript SDK Sample, I realised I could successfully login and also view FB scopes!
My Dev environment
MVC 5 application
Visual Studio 2013 Community edition Update 5
Microsoft.OWIN v2.2.1
Microsoft.OWIN.Security.Facebook v3.0.1
Finally I found a YouTube Video by ProCoder which mentioned to put the correct path in the Valid OAuth redirect URIs as http://localhost:1234/signin-facebook and it worked. If you haven't already added, you will need to add Facebook Login product to your Facebook app.
I also set App Domain to localhost and Site URL to http://localhost:1234/
I have added 127.0.0.1 and MY.EXTERNAL.PUBLIC.IP to the Server IP Whitelist Under Security in the Advanced Settings option of the Facebook app.
All these settings I replicated in a new MVC 5 application and it worked like a charm.
update the package Owin.Security.Facebook 3.0.1 to 3.1.0
It works for me

facebook external login not redirect back

I have a MVC5 application with external login. When I use Facebook login, after I put in my login information into facebook login page, facebook fails to direct me back to my application.
I got a white page with the following URL in Chrome's URL bar:
https://www.facebook.com/dialog/oauth?response_type=code&client_id=632877723495196&redirect_uri=http%3A%2F%2Flocalhost%2FMPOS%2Fsignin-facebook&scope=email&state=l2oJwWdkbRsgZHyr6-5lL9ZTZc-eMbRBkH73L-h1ZN_MWvWriNeEdCxuNspi4QptZAna60SQIJX4NB5AItzP6NxpDCz10m48JInWUfvQGWkgFgZhZNFIaTz6ju-kEQ-RyiObgiMOKvBougeeaSHD7CAzTrvc1Gj6XdGgGbUgyrM9d1KZUEGbqh_MdyBPg4wTFbQEiui-2GzvcIvhOVtTRC12NnhgnVyLCrrKEDFaWdU
If I use IE, I got "The website cannot display the page" error page with the following URL on the borwser's URL bar:
https://www.facebook.com/login.php?login_attempt=1&next=https%3A%2F%2Fwww.facebook.com%2Fv2.1%2Fdialog%2Foauth%3Fredirect_uri%3Dhttp%253A%252F%252Flocalhost%252FMPOS%252Fsignin-facebook%26state%3DWbWcYquZJnjvo8Db42l6goqpMUrioHL6HBVIUMu74QvqMuAjNzWizophJhNpf3NHCbw1-Dw1tsdgmv2h1f0ct1zcLJ_jlSXQ3ImCHVN_PXRkRedVB3gjTQb59-tbxPKxJQTuNhPvOKLq6aBjakP_fJDw5zXKZ55LrRzHVzEQ39Qff7WXsNJpke2BTHILHLI0I5jcWiXEgE-HeH7La19ttaL9LhrcyXP4DBiWaXuUNZc%26scope%3Demail%26response_type%3Dcode%26client_id%3D632877723495196%26ret%3Dlogin
Anyone has an answer to this problem? Thanks!
Thanks Nathan, clear cache on browser didn't help. I tried to clear cache/cookies on both IE and Chrome several times before I post the question.
The weird thing is that if I create an app under my personal facebook account and use the FacebookAppID/FacebookAppSecret for my app, the external login works fine. That's how I did all my testing.
But when I try to deploy the website I want to create the app under company's facebook account. I set up the app under the company's facebook account exactly the same way as I did when using my personal facebook account, then I got this redirect problem. If I switch back the FacebookAppID/FacebookAppSecret to the one I created under my personal account, everything works fine. That's even more puzzling.
I finally figured out the problem. I forgot to turn on "make this app and all its live features available to the general public" setting for the app I created in Facebook. So the login was only available to the developer who created the app. After I turn that setting on (it is under the Status and Review Tab), everything works fine.

Is Facebook Connect (Login) a good solution for an app to use?

I have seen many web apps supporting Facebook Connect...
But when i login through those apps sometimes the authentication is successful but nothing is returned to the app and the login page just goes to a blank page in that new windows and stops... The whole process fails... And this has not occurred once but many times...
So my question is:
Is Facebook Connect a good solution to use in apps or should i use something like Google Login or Twitter Login or OpenID or just a simple password based login or all of the things and let users choose what they want?
And if your answer is app the solutions then wont my database become messy and the app slower because it has look for more data now?
I know it depends on various factors but I just want your opinion, what would u choose and why?
Supporting Facebook connect as login function make sense only if your app has something to deal with Facebook (which is the most of our app today ;-)).
The behave of some app when sucessfully Authenticated and then Authorized is up to these app.
FB login give you all the tools to build you own user experience.
The things become a bit more difficult when you want to introduce FBConnect within already existing login base, while you have to find a way to bind the Identified FB user with your user account.