My current app works with the facebook API and today it started to redirect the user for login on facebook with japanese (or some other oriental language). I'm pretty sure nothing was changed on my code and I've also downloaded the src code from the library again.
Somebody having the same issue? Any ideas?
Also seeing it here, as of this morning (EST.) Seeing it in all apps, as well as m.facebook.com. Language is Indonesian, apparently. (E.g. "Dapatkan Facebook untuk iPhone dan menjelajah....")
edit:
This is apparently a Facebook-level issue. You can track the status here:
http://developers.facebook.com/bugs/407246299295529?browse=search_4fa410ea79db26337556383
"On initial login using Facebook, the dialog asking the user to authorize this application is displayed in seemingly random languages.. Only Happens when user is connected over Wifi."
I have the same issue in Android device and iPad.
I also post this issue in here:
The sample of in facebook sdk for Android always displays authentication page with language "Bahasa Indonesia"
I am in Taiwan and login page always displayed in Bahasa Indonesia. The network that I am using is Chunghwa Telecom ADSL.
I tried to changed the network provider of my device, e.g. 3G mode or other public wifi service. The login page turns into language as where I am.
I am using this URL http://touch.whatsmyip.org/ to see my IP, when the start part of IP is 220.133.X.X, the login page is wrong.
IP is 101.10.X.X or 60.245.X.X, the login page displays in correct language.
Related
I have an app that relies on deep linking using a custom scheme ://appName for some user email verification. The way it currently works is:
User enters email in app and hits send
Email is sent to user, user taps on "activate" button
Button opens valid website url which then redirects to deep link url, i.e ://appName/auth/tokenId
All was good, and this worked flawlessly on iOS 9 devices, but iOS 10 seemed to break it.
After further investigation:
appName://id=123 opens in iOS9, but in iOS10 safari displays that “the url can’t be shown” for the exact same URL.
They will both work however for the URL scheme alone (appName://)
You can even test this on your devices/simulator to see. Perhaps the change is in safari?
More investigation:
Almost sure its related to Safari.
Any ideas on how to resolve this?
Eventually tracked down this issue and got a response from the CEO of Branch. He said:
Ah interesting find! I just tested a few ways and it seems to reject
typed-in URI schemes with a deep link host & path, but you can still
trigger them in JS and click them on page. You just can't type it in
for some reason.
So beware of this if you are using deep linking in such a way on iOS 10!
I personally ended up just giving the direct deep link URL in the email, rather than embedding a redirect in a nice button. Something like this appName://gotoHere/here
My cn1 app incorporates loggin in with Facebook and Google+. When the doLogn() is called on Iphone, A Safari page is opened which allows the user to enter their credentials for Facebook or Google respectively. The problem I am facing is that my app has just been rejected by apple because the user is taken out of the app and into safari in order to log in with Facebook or Google and this, according to apple, provides "poor user experience". Apple recommended that I use the Safari View Controller API which allows the display of a URL and inspection of the certificate from an embedded browser in an app so that customers can verify the webpage URL and SSL certificate to confirm they are entering their sign in credentials into a legitimate page.
I notice that Codename one has a WebView component. However I'm not sure if it's possible to open the url in Webview instead of Safari when I call the doLogin(). If it is. How do I achieve this and is Web View the right component to use? Or will I need to use the Safari View Controller API, if so, how do I add this api to my cn1 project, is it even possible?
I would recommend that codenameone incorporate this into their Facebook and Google login features to prevent any future users from getting rejected by the app store.
It appears that this happens automatically on Native Iphone apps - Safari web view opening when logging to FB through iOS 9. For IOS should I try to implement a native Facebook log in then? If so. Where do I start?
final Login fb = FacebookConnect.getInstance();
fb.setClientId("XXXXXXXXXXXXXX");
fb.setClientSecret("XXXXXXXXXXXXX");
fb.setRedirectURI("http://www.mibrandapp.com");
FaceBookAccess.setPermissions(new String[]{"id", "name", "first_name", "last_name"});
fb.setScope("id");
fb.setCallback(new LoginCallback() {
#Override
public void loginFailed(String errorMessage) {
Dialog dg = new Dialog();
dg.setTitle("Login failed");
dg.show();
}
#Override
public void loginSuccessful() {
....
}
});
//fb.doLogin();
fb.nativelogin();
Currently the Codename One build server uses Facebook IOS SDK 4.4, which uses the default behaviour of opening the Facebook app to authenticate - if installed - and the Safari app if it is not installed.
If you switch to the "iphone_new" build target (which will soon be standard) it uses the newer Facebook IOS SDK 4.12, which will (by default) handle the authentication inside a web view in your app.
Running some tests on this approach, I found that, on iOS 9, you need to add the following to your ios.plistInject build hint:
<key>LSApplicationQueriesSchemes</key><array><string>fbauth2</string></array>
I have just committed a change that will include this automatically so after the next server update (probably on Friday), it will just work without this build hint.
UPDATE June 14, 2016
I have just updated this in SVN so that it will use IOS SDK 4.12 by default with will resolve this issue without having to make any changes. The server will be updated Friday - after which you should be able to just send your build (with no special build hints) and it will work.
Codename One uses native Facebook login when the Facebook app is installed and activated. You need to use the Facebook Connect API as explained in the developer guide section.
I found a lot of tutorials about opening an app by a custom url scheme like:
myappname://
Thats nice but it would be great to open an app by registering the real app domain over the http link like
http://www.myappdomain.com/blablabla
So - for example - if a visitor comes to a webpage (on her/his mobile) it is normally opened in the browser, excepts the installed app is listening to the opened URL and opens itself instead of the browser.
How is this done (i've seen this at another app). Any help would be great. Thanks in advance!
It is a new feature in iOS9. It is explained in the WWDC15 talk Seamless linking to your App.
You could also add a small piece of javascript to each page that opens your custom URL-scheme.
We are having an issue on our network with iOS devices (ipads, iphones etc): After connecting to the SSID, the iphone / ipad immediately opens the Captive Network Assistant (CNA) - it is like a scaled-down browser without navigation buttons etc - that displays our welcome page (ready for the user to authenticate his MAC in the network to give him internet). This CNA is a functin of iOS, and happens automatically.
I was looking around on this forum how to make the user open his Safari browser by clicking a link (while in the CNA), thus sending him away from the CNA and into Safari (which is where I would prefer him to be).
I searched phrases such as: "How to set a link to open in safari", but I get results about people using phonegap to do such a thing...
One user talked about using
window.open(myURL, '_system')
but I don't know if that is solving my issue.
Basically my plan is to:
- Have my Welcome Page (the page displayed after the user connected to my SSID) detect what type of browser the user's device has. My Welcome Page is hosted at a site which is in the Walled Garden of my controller, so every device can see that Welcome page (whether they have full internet access or not).
- If the user has an iOS device, the CNA browser opens automatically. My controller detects the device has a CNA browser and loads a simple page with the message (like): "click here to start to navigate"
- During the next few seconds (while the user is digesting the message), my controller gives the user's MAC full internet access
- When the user clicks that link in the CNA browser, the CNA closes and then opens Safari, and also forces Safari to open the destination Welcome Page (where I want my user to be, depending on the antenna to which he connected).
I really hope that all makes sense...
I found this link about the CNA browser in this forum:
Bypasses Apple Captive Network Assistant Login in iOS 7
But it talks having the user open Safari right from the start (disabling the CNA function), "hoping" that the user opens Safari (rather then going directly to one of his apps). I prefer that the user has to "click to continue", which makes Safari open and he sees my Welcome Page.
EDIT : this solution doesn't work after iOS 10.3. Not sure if that's a feature or a bug : https://forums.developer.apple.com/thread/75498
EDIT2 : Apparently it works again on iOS 11
There is a simple way to do that, if you have control over the captive portal server.
When connecting to a wifi network, iOS devices send a GET request to a bunch of predefined urls (http://www.apple.com/library/test/success.html, ...) , to see if there is Internet connectivity (wispr requests). The iOS device expects the answer <HTML><HEAD><TITLE>Success</TITLE></HEAD><BODY>Success</BODY></HTML>. If the request succeeds, but the answer is different (for example your captive portal page), it triggers the CNA to open.
At this stage, the CNA thinks you are not connected and will show a Cancel button at the top. Every link will open inside the CNA and not in a Safari window, no matter what you do. The CNA is done so that you can get your user through the log-in process. In order to see if the log-in process is done and connection is finally established, the iOS device will now and then send another wispr request. This happens every 40 seconds, or whenever an HTTP request is emitted (navigation within the CNA).
When your server finally answers Success to a wispr request, the CNA will mark as connected, the button at the top will change into Done. At this stage, any link to an external url will close the CNA and open in Safari :)
So to summarize, you can achieve what you want with the following connection steps :
server answers initial wispr request with your CNA page.
the page opens in CNA. In that page, have some JavaScript that immediately triggers navigation within the CNA, for example : <script>window.location.reload(true)</script> this will trigger the iOS device to immediately send another wispr request
server answers this second wispr request with <HTML><HEAD><TITLE>Success</TITLE></HEAD><BODY>Success</BODY></HTML>, this will trigger the CNA to mark as connected
have your CNA page to show a link to an external url
Extracted from an answer by Ryan at How can I open an external link in Safari not the app's UIWebView?
To have a specific link switch to Safari, simply add target="_system" to the link, as in
Link Text
Or to catch all links in your javascript that have target="_blank", include jQuery and pass them to window.open with the '_system' param. This will work on both iOS and Android.
$(document).on('click', 'a[target="_blank"]', function(ev) {
var url;
ev.preventDefault();
url = $(this).attr('href');
window.open(url, '_system');
});
Javascript does NOT work fully in CNA, it is disabled for security reason.
target="_system" is a safari feature, not a CNA one.
==> briefly, _system fails in CNA.
I've been following Facebook code sample "FBShareSample" to create a share dialog,
The example handles the fallback for user without FB App installed.
Everything is working well with FB App but when I get to the fallback the UI in my app look different from the one in FBDemo (navigation bar, buttons etc.)
In addition the friends button is not active.
Am I missing some kind of configuration in my iOS client? Is it somehting that need to be configured on my App page on FB?
I've used Charles to analyse the request and response and the only difference between FB sample code and my code was the userAgent string.
The problem was resolved by removing from the UserAgent parameter the string: " webView", for some reason this specific string caused FB to return a different layout/CSS page when this parameter was present.