xamarin facebook authentication no longer supported for android - facebook

following the microsoft examples as documented here:
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/authentication/azure-cosmosdb-auth
Everything is fine up to the point where I run the xamarin forms app to log in using facebook to get a token.
The error from the emulator when I try to login is this:
For your account security, logging in to Facebook from an embedded browser is disabled. To continue, download and log in to Facebook app on your device and try again.
I have tried downloading the app on the emulator, but that makes no difference, my facebook app is in development state but even then it should at least get me to the login page and allow using a test user.
It seems that facebook stopped supporting android login using embedded browsers from 5 October 2021. See here:
https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers/
Would it be possible to please update the sample with either b2c or with an alternate method or details of how to get facebook auth working again?
If anyone have examples that someone new to these concepts could follow that would be great.
Thanks in advance!

Related

Facebook Login On Xamarin Forms After Embedded Webviews Have been Deprecated

I am struggling to login on Xamarin Forms with Facebook on android specifically, ios is. still working, the implementation in my app is as described in this article: https://evgenyzborovsky.com/2018/03/09/using-native-facebook-login-button-in-xamarin-forms/ and has worked perfectly until Facebooks changes. Now when users try to login we get the following error message on android only: "Login disabled", "For your account security, logging in to Facebook from an embedded browser is disabled. You may be able to continue by updating the app you're logging in from and trying again."
I have read the write up on Facebook Developers here: https://developers.facebook.com/docs/facebook-login/android/deprecating-webviews
But the solution does not seem to be clear for Xamarin Forms as we are using Xamarin.Facebook.Android version 7.1.0
Any help or being pointed in the right direction will be appreciated.
The package has been updated few days ago to the version 11.2.0.1.
https://www.nuget.org/packages/Xamarin.Facebook.Android/11.2.0.1
I had the exact same issue and it's now fixed.

Login Failed you cant use facebook to log into this app or website because there's an issue with its implementation of facebook login (NuxtJs App)

I tried to implement firebase authentication for my NuxtJs app for facebook social media login, but even after I made sure that all settings are correct (including hash and firebase settings), Facebook always threw this vague error.
Login Failed you cant use facebook to log into this app or website because there's an issue with its implementation of facebook login
I have another NuxtJs app that also uses firebase authentication for Facebook login and it works perfectly. I've made sure all the settings are the same with my currently problematic NuxtJs app. What could be the reason for Facebook throwing this error?
Wait never mind it works now. Apparently it's all because my NuxtJs app was being restricted by Facebook for violating their policies. After appealing the restriction, it's now working perfectly well.
The error message was so vague that I didn't think it was because my app was restricted by Facebook. But it seems like that was really the answer. I think Facebook should make the error message a bit clearer that it was caused by the app being restricted.
Anyway, thanks for the help folks.

You are not logged in.Please log in and try again.(iOS)

I have implemented Facebook Login using OAuth 2.0 in my xamarin.forms application.But when I try to navigate to facebook page it gives following error:
You are not logged in: You are not logged in.Please log in and try again.
It works fine with android but not working with ios.
I have searched it but didn't get working solution.
I got the solution:
Redirect URL should be same ,when you request for Facebook login and in Facebook settings(Valid OAuth Redirect URI's).
Thank you.
If you intend is testing the app in a staging environment, leave the iPhone Store ID field blank and it will allow you to save the iOS platform and test.

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 Connect Replaced?

I would like to develop an IOs app with facebook integrated.
However, after some research I found out that facebook connect seem to be outdated?
Even the facebook official page only talk about Single Sign On where user will be redirect away the app to login.
So my question is, do you think it's still safe to use Facebook Connect?
Since i still see a lot app using it.
Yes Facebook connect for iOS has been replaced with Facebook SDK for iOS and it is an open source library on Github that users their Graph API. I would not start a new project with the deprecated Facebook connect library because it will eventually be killed and they won't give you a lot of notice since the replacement has already been out for over a year.