Share mobile logged in user details with PHP session - php

I am working on a mobile site that will run alongside a mobile app being developed by another company. My product manager has provided a spec, in which she is mentioning two options to implement a feature:
Clicking on button from mobile app will open mobile browser, where the user will need to login again, and proceed to perform required action.
Clicking on button from mobile app will open in-app browser, user does not need to login, and completes the entire flow and closes the in-app browser.
My question is: I do not understand difference between mobile browser and in-app browser. Does in-app just mean mobile browser opened from inside the app? And if that is so, then using PHP will I be able to recognize the current login in the app? or is there any way I can ask the mobile team to set a session when they open the "in-app" browser such that I can access that session and determine who is logged in?
As you can see, I am pretty ok with PHP and server side coding, but my knowledge of these new mobile technologies is very poor...I guess I am getting just too od for this job now.. sigh.
Any pointers are very much appreciated.

I think by in-app browser he has meant WebView which opens web pages as a part of application

This question seems to be duplicate although here is the ans you probably need.
Android WebView VS Phone Browser
Have you any doubts left?

mobile browser: a complete application inside the mobile device. Common examples are Chrome, Firefox mobile, Opera Mobile.
in-app browser: it's an instance of WebView. That's a normal view inside your app layout that is able to render web-content.
To open the webview as a currently app-logged user, you generally will add some token parameter to the URL that the web development team can use to identify the user on the server.
The WebView generally behaves like a browser, but you should implement a WebViewClient to properly steer some of the navigation patterns to make sure it behaves inside your app, the way your app should.

Related

How to force user to open my website in safari when they access my wordpress site

My website has Facebook log in function, which does not work if user views my site on facebook app, messenger app, iOS chrome app, Gmail app of iPhone.
Therefore, I need to force user to open site on Safari in such case.
Is there any way to do that? My site is built by wordpress.
Thanks!
UPDATE 1: I am thinking about a javascript to detect if users is on iOS, then pop up a javascript to ask if user wants to view on safari. Is it possible?
If you are in an Apple app like Mail, Messages, Notes etc. It will open with Safari, but if you are in another app eg. Facebook, Twitter, anything developed by a developer, you can't choose how you want to handle URLs in their app, that is up to the developer, and as a developer and Apple guidelines, it is best to open URLs in app so that the user don't leave your app. They use Safari anyway as UIWebView is a component of Safari, and we use UIWebView to browse inside our apps. (This can be manipulated, but still doesn't change the answer as to where you can't control how to handle links inside apps.)
It's not possible to open a specific browser (Safari in your case) from a website.
If you're working on an app, you might want to have a look at SFSafariViewController.
Have a brief idea about different kind of webviews in iOS here

IOS HTML5 app Facebook Login failure when 'Add to Home' screen used

I have been working on a website that has a mobile version. Integrated into the site is a bit of code that allows users with FB to register without having to fill out a form. If the user meets any of the following conditions all is well
Uses ANY desktop browser
Users ANY mobile browser
The FB just works. However as soon as I do an 'Add to Homescreen' with IOS to make the app look and perform like a native app, when anyone uses the FB signup I get the
'Given URL is not permitted by the application configuration: One or more of the given URL's is not allowed by the Apps settings. It must match the Website URL or the Canvas URL, or the domain must be a subdomain of one of the App domains'
I am assuming that once you use the add to home screen, and the app gets its own instanced browser, the URL changes, likely some form of localhost derivation maybe?
I can't find any definitive answers to fixing this, and was wondering if anyone else had experienced this HTML5 IOS app problem?
Looks like the dev of the extension I was using will be working on a different authentication flow, so not giving this any more dev time

Android and Javascript: How to know in javascript that an application is installed in the Android device or not?

I have an android app on Google Play and also an website where.
For the moment, I am using javascript to detect if the device connected to the website is an android device. If is, I am displaying a popup dialog on the device inviting the user to download the app from the PlayStore. If the user clicks ok, he will be redirected to the PlayStore page of my app, I f he clicks no, he will continue using the browser.
Now, the problem is that when the user have installed the app and tryes to access the webpage again, he will be asked again to download the app, even if he allready installed it (which is not a good idea).
Do you know a solution on how to check if the user has allready the app installed on his mobile device?
It is also possible to do android detection with php, so if you have a method with php to detect if the app is installed, I can also use it.
Thank you very much.
I don't think this is possible for security reasons. I would not want some random website I visit to be able to access my phone Package Manager and find out what apps I have installed.
This would raise a lot of privacy and security concerns.
But I saw one answer that might have a different way of achieving your intent that might be useful to you:
https://stackoverflow.com/a/12901352/1369222
Even if the user doesn't install your application, your web site shouldn't ask more than one or two times to download your application from the PlayStore. The usual way of doing this is to use the browser's cookies in order to remember if it's a new visitor or not. It's not full proof because the cookies functionality could have been deactivated but at least, you won't have to worry about this problem for most of your visitors.

Opening an iphone app from PHP/Javascript coded website/page

My question is pretty simple actually... I wish to know if, and how, it is possible to check for the existence of an application on an iphone (twitter app for example) and then pop it open via PHP and/or javascript.
The process would go as follows:
User scans a QR code with his Iphone that links to the page
On the page, php or javascript does some magic to check if, and what, twitter applications exist.
The page then sends a custom URL scheme to open up the desired app (twitter:// for example).
Is this possible? Are there any examples of source code that display javascript/php doing this from within the context of an iphone?
Thank you for any help. :)
It would be imposible to check for the existence of an app from Safari.
You may launch an app using a link if the app has registered a protocol. For example, to launch the Facebook app and open it on the user profile you may link to fb://profile.
Here I found a list of some other iPhone apps protocols:
http://wiki.akosma.com/IPhone_URL_Schemes

Facebook Connect - Mobile

I am currently in the process of creating a mobile version of my web app.
The app is being developed with Facebook's PHP Client Library.
The issue:
I am using the following mobile url to allow users to log in using the mobile devices:
http://m.facebook.com/tos.php?api_key=APIKEY&v=1.0&next=http%3A%2F%2Ftweelay.net%2Fm.php&cancel=http%3A%2F%2Ftweelay.net%2Fm.php
APIKEY being my app's actual Facebook API key.
In the url I am telling Facebook to redirect the user back to http://tweelay.net/m.php when the user signs in or clicks cancel on the log in screen. I am pulling my hair trying to figure out why it keeps sending the user to http://m.tweelay.net/m.php which is currently an invalid end point.
I have gone through all of my app's settings on Facebook and I cant find any that reference http://m.tweelay.net and going through all of my source code I cant find any that reference the m. sub-domain either.
Any ideas? Is there a setting I'm missing? Maybe a Flag in the library?
I've seen Facebook do this when detecting the mobile browser type and also sometimes randomly through Firefox (it can also happen when trying to get to facebook.com). I've managed to reset it sometimes, but it's not a guaranteed fix.
If you want to be sure the user makes it to your correct site I suggest creating the subdomain and redirecting traffic to your usual site, it's what I did and now I don't worry about it reverting back.

Categories