Facebook sdk 4.6 and PFFacebookUtils 1.8.5 login open webview although Facebook app is install on My device - facebook-sdk-4.0

I update My Facebook sdks to 4.6 and Parse to 1.8.5 , and after that I notice that in iOS 7,8 in login the app is go to Facebook app for premmisions and in iOS 9 the app go to safari.
And I try to add setLoginBehavior before logInInBackgroundWithReadPermissions but it did not solve the problems.
[[PFFacebookUtils facebookLoginManager] setLoginBehavior:FBSDKLoginBehaviorSystemAccount];
NSArray *permissions = [NSArray arrayWithObjects:#"email",#"user_friends", nil];
[PFFacebookUtils logInInBackgroundWithReadPermissions:permissions block:^(PFUser *user, NSError *error)
{
}];
what can be the problem ?

scbojer says:
The (Parse) Facebook login in iOS9 by default will use Facebook in the safari browser instead of the Facebook App as this is now regarded as the best user experience.
https://stackoverflow.com/a/32710449/1180974
I am having the same problem, and I completely disagree with this "best user experience" argument. I have not found any workaround for the moment either.

Related

How to deeplink in Nextjs

I am currently using window.assign(bundlename://linkname) to deeplink a user into the app if it’s installed on their device but I keep getting Safari cannot open page because the address is invalid
I also tried to use window.location.assign = bundlename://linkname but that does not work either
Thanks for the detailed comments - I am able to open with document.location
See this sandbox, replace with an app scheme if you do not have Doordash installed - https://codesandbox.io/s/cranky-lewin-ydbp5?file=/pages/index.js

"Browser or app may not be secure. Try using a different browser." error with Flutter Firebase Google Login

I am using flutter web and firebase authentication to build a web app. For that
1. Created Firebase app with Google signin as one of the sign in methods.
2. Added the dependencies as given in https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example
and https://dart-pub.mirrors.sjtug.sjtu.edu.cn/packages/firebase_auth_web.
When I try to login, the Google sign-in window appears. Once I enter the email address and press enter, it gives the following error.
"Couldn't sign you in This browser or app may not be secure. Try using
a different browser. If you’re already using a supported browser, you
can refresh your screen and try again to sign in."
I used Chrome browser.
What should I do to make my app more secure ? For android, we had the option of using SHA keys to encrypt the connection. Do we need to do something similar for web ?
Incomplete answer:
This problem isn't specific to flutter. It happens whenever you try to sign in to Google in a Chrome instance that has debugging turned on. In other words, if you, your automation software, or IDE starts up chrome with a command like chrome.exe --remote-debugging-port=9222
If running Chrome normally (out of debug mode) is not an option, then try https://support.google.com/accounts/thread/22873505?msgid=24501976 or if you are using Electron then try https://support.google.com/accounts/thread/22873505?msgid=24503570 but I, personally, haven't been able to make these work for me, yet.
Please upvote the question at https://support.google.com/accounts/thread/25209002 if you want a solution to this problem that actually works.
The issue was with the chrome developer version Flutter use to launch as a device. If we open the same URL (localhost:portnumber) in the normal chrome, it will work without any issue.
The following worked for me:
Go into your google account
select Manage Account
Security
Less secure app access (need to scroll down a little bit)
set to off
Then I was able to login in and debug in IntelliJ
(for me, for some reason, I had to create a new google account, couldn't get it working with my existing account but it worked with my new account)
You can use user agent switch to switch another browser (for example opera).
https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
They try login. Once you successfully logged in you can remove or disable the extension.
I had the same problem with Firefox. The only way I could fix it was to create a new profile. So you could try to run Firefox with -p switch and create a new profile.
firefox -ProfileManager
firefox.exe -p
Update: check the firefox config (address field: about:config)
be sure marionette.enabled is false
For Test Automation Users-:I saw many testers are facing this issue for sign in using Google but I think below my idea will save their time.
Best Work Around is as below-:
Open automated Chrome browser as shown below
Sign up with new details which you want to use.
Now after successfully completion of sign up.
Then use that email and password for signing into gmail using Selenium or any other test automation tool

Firebase Dynamic Links do not survive app install on iOS 11.3.1

Firebase Dynamic Links do not survive on iOS 11.3.1 when user don't have installed. Anyone else experiencing this issue? This works fine prior to iOS 11.3.1
Repro steps::
Click on FDL link
User redirected to app store
User install app
User open app
FDL params not passed
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
//the url here returns:
//google/link/?match_type=none&match_message=No pre-install link matched for this device.
or
//google/link/?dismiss=1&is_weak_match=1
}
I've reported this to Firebase and they're still working on the fix.
https://github.com/firebase/firebase-ios-sdk/issues/1244
In the meantime, the workaround is to turn off the forcedRedirectEnabled.
FIRDynamicLinkNavigationInfoParameters *navigationParams = [FIRDynamicLinkNavigationInfoParameters parameters];
navigationParams.forcedRedirectEnabled = NO;
components.navigationInfoParameters = navigationParams;
or if you use the admin console to generate the link, you need to leave the Skip the app preview page setting unchecked.
Note that this means users will see one interstitial page before it redirect to app store, which is not ideal but at least FDL params will be passed.
Hope this helps someone.
Cheers!
I had the same issue.
And I found that when I delete FirebaseDeepLinkPasteboardRetrievalEnabled in Info.plist the problem is resolved
https://firebase.google.com/docs/dynamic-links/ios/receive
Optional: Disable the Dynamic Links SDK's use of the iOS pasteboard.
By default, the Dynamic Links SDK uses the pasteboard to improve the
reliablity of post-install deep links. By using the pasteboard,
Dynamic Links can make sure that when a user opens a Dynamic Link but
needs to install your app first, the user can go immediately to the
original linked content when opening the app for the first time after
installation.
The downside of this is that use of the pasteboard triggers a
notification on iOS 14 and later. So, the first time users open your
app, if the pasteboard contains a URL, they will see a notification
that your app accessed the pasteboard, which can cause confusion.
To disable this behavior, edit your Xcode project's Info.plist file
and set the FirebaseDeepLinkPasteboardRetrievalEnabled key to NO.

Following links in a course on SAP successfactors app

We're developing SCORM content for our client to put on their SuccessFactors LMS, and access through the SuccessFactors app on ipads.
Some of the course pages include links to pages on the internet and the clients intranet, but we're finding that these links will replace the course in the app's web view, and we aren't able to return to the course.
Has anyone found a way around this, so we can open the links in a new window and keep the learner in the course?
The Successfactors iOS app should work similarly to other iOS apps.The following code forces the iOS app to open a URL in the Safari browser. I believe it may also open in the default browser. Please try this code:
<div id="launchInBrowser" data-href="https://stackoverflow.com/posts/37790430">Stack Overflow</div>
and in the page's javascript:
document.getElementById("launchInBrowser").addEventListener("click", function(evt) {
var a = document.createElement('a');
a.setAttribute("href", this.getAttribute("data-href"));
a.setAttribute("target", "_blank");
var dispatch = document.createEvent("HTMLEvents");
dispatch.initEvent("click", true, true);
a.dispatchEvent(dispatch);}, false);
check here for more information:
Force link to open in mobile safari from a web app with javascript

Firebase SimpleLogin facebook auth gives error when used on ie10 on windows phone

this is my first question on SO, so I hope I will formulate it well.
Simply put, I have a firebase-hosted app reachable at http://campanelly.firebaseapp.com
It is still in development stage, so it does not work completely. What does work on most browser EXCEPT IE10 on windows phone is the facebook login. The facebook popup correctly show up, I put username and password, the popup closes, but the FirebaseSimpleLogin object returns an error in the auth callback. I inspected the object with dev tools and it's an unknown error. this is the stacktrace:
Error: FirebaseSimpleLogin: An unknown error occurred.
at Error (native)
at Object.fb.simplelogin.Errors.format (https://cdn.firebase.com/js/simple-login/1.3.2/firebase-simple-login.js:33:294)
at Object.fb.simplelogin.Errors.get (https://cdn.firebase.com/js/simple-login/1.3.2/firebase-simple-login.js:33:429)
at fb.simplelogin.transports.XHR_.formatError_ (https://cdn.firebase.com/js/simple-login/1.3.2/firebase-simple-login.js:94:317)
at XMLHttpRequest.fb.simplelogin.transports.XHR_.open.f.onreadystatechange (https://cdn.firebase.com/js/simple-login/1.3.2/firebase-simple-login.js:92:407)
This problem only shows itself with IE10 on Windows Phone. If you need to reproduce the issue, you can use IE11 Desktop and emulate windows phone and ie10, or Google Canary, which has a device emulation feature.
If you think I left out important details or asked an unclear question, please do tell.
Thanks in advance
P.S. I wanted to contact Firebase support, but on the Contact us page they advice to use SO and put the firebase tag, so, here I am.

Resources