Use facebook smartphone App to login in Captive Portal auth page - facebook

Is there a way to use mobile apps Facebook (Apple, Android, etc ...) to automatically authenticate users who wish to use social access for the Captive Guest-Wifi portal or similar services?
I worked with the standard social login authentication module of the standard captive portal which intercepts the first call of the operating system (Captive Portal Assistant) or the standard browser (Chrome, Safari, FF, etc ...), but this means that a user must know his credentials.
It could be easier to use the App where the customer is already logged in...
thanks!

I need to authenticate the facebook user not to only open Facebook App.
To do it, check this link - Facebook Login for Android out. It would help you.
Also, in this question - Making facebook login work with an Android Webview there is a method to create a Facebook login button with their javascript API.
The problem that you may face is "Android captive portal's splash page limitation". The splash page has a lot of limitations on js codes.
After that, if you faced this kind of problem, create a redirect page for the splash page and on the redirected page, you can do anything you want as a normal web page.

Related

Facebook login from Samsung SmartTV

I have been experimenting with Samsung and LG smartTV specially for Facebook based login.
After searching rigorously over LG and Samsung dev forum and StackOverflow, I couldn't come up with any solution. Later I created a prototype app with the following strategy -
I have a simple application, with a welcome screen and a big "Connect with Facebook" button
Once user click over "Connect with Facebook" it redirects to Facebook login page.
Later user enters email and password
After successful login Facebook redirects back to our online hosted application page with access_token
Then we have an angularjs based app which just do some Facebook graph call and show as proof of success.
I have integrated the above strategy in both LG and Samsung TV. LG seems to be working with Emulator, If I use window.NetCastSystemKeyboardVisible(true); which shows the native keyboard on redirected (Facebook login page).
But I couldn't find anything similar to window.NetCastSystemKeyboardVisible(true); for Samsung Smart TV.
So my question is,
Am I doing it right ? Or Am I missing something obvious that someone knows already ?
Regards
Unfortunately there is no way to set up login on Facebook through a SmartTV for third party applications. At the moment its not available even by accessing FB data using the SSO option. The Facebook app on SmartTV uses the old FB API, now deprecated and available to Samsung by a specific agreement between the two parties.

Mobile Website Facebook Login using Facebook App for login details

Using a web browser e.g. Chrome on Android, if a mobile website requires a user to be logged in to Facebook and they are not, the browser will ask for Login details even though the phone may be logged in to Facebook via the Facebook native App. Is there any way to get details from the Facebook App without the user having to log in again?
If you want to login in website in a browser, using Facebook account from Facebook app - it is impossible, without intermediary application, or service. And even with it, I don't think, that you can get user login data.
Other approach - is try to launch Facebook app from your site, and show site from it, but again, you can't login to it, using app.
Why? Because the app, holds only token data, and nothing more. You can't get other information, like password, or email. Also, the work of browser, that save cookies and the app, that save token is different. You can't connect them together.
Clearly speaking it is not possible using website in browser.
Even it is also not possible if you develop any android app, the reason is that the facebook app will not share any data to any other app (even if it is running on the same device).
I also don't think that launching the facebook app from browser will be feasible for you, as you just want to use the facebook login system and then want the users back on your website (and again facebokk will not send any data to your web or app even if it is launched from your web or app).
I think it's not possible, because we wont link browser and an app.
I developed one android app with facebook login integration.If facebook native app already logged in, now i click my app facebook login button it directly redirect my app to my home page without asking fb username and password.
For me i used localStorage in javascript
localStorage.setItem("userName", userName);
localStorage.setItem("password", password);
var uname=localStorage.getItem('userName');
var pass=localStorage.getItem('password');

Facebook native mobile application and mobile browser sharing session

I have a website which allows login via facebook functionality and displays photos from facebook.
While accessing from a mobile browser I would like the website to automatically login(when the click on FB login button, without entering username and password) if the user is already logged in via the native FB application (iOS or andriod). It seems to be that I can do that by building a native iOS or android application and use facebook single sign on feature. Is it possible to do that without having the user install anything on their mobile device?
That is not possible.
Auto-Login relies on auth tokens that will be granted to a website or mobile app after a user approves an app. For security reasons, those tokens are tight to the cause they were issued for. Particularly, web tokens and mobile tokens are not interchangeable.
So you could build a native mobile app to get a "native token", but even if you would manage to (cookie-)inject it into a browser view, your website's backend couldn't use it.
More generally, you're raising an issue even facebook can't solve: Say you are using a facebook mobile app and logged in there. If you open facebook's web version on that very same phone, you'll have to log in there again. The root cause is the same as with above. Specifically, any native app is uncapable of setting arbitrary auth cookies into the OS browser. I personally believe this restriction will not fall, because it would have a large security impact - just imagine how any app could set (and possibly get) cookies for any website.
If they've never logged in facebook from their Mobile, how will your website ever know them ?
Is it possible to do that without having the user install anything on their mobile device?
Like PC's, users in a mobile device need to login in their phone in facebook's website before being eligible to login "automatically" to your website. When I say automatically, I mean they still have to go with the first time process of "Do you authorize this app/website to do X things on your account". That message is inevitable when using facebook's api on the web.
Hope this answers your question.
Is it possible to do that without having the user install anything on
their mobile device?
No this would not be possible. You need to have a native or hybrid app (phonegapped etc) to make it work. Mobile web apps run in a browser sandbox and without native code interface - you cannot get to the native SSO of FB on your mobile device
Did you have a look at this facebook page ? I'm not sure what you ask is possible, as basav said, but maybe you'll have some clues there.

Facebook canvas app vs Facebook mobile web app

I'm a bit confused about the difference between a facebook canvas application and a facebook mobile web application. Here is the context of my confusion..
I have a canvas application, let us call its namespace as myfbapp, and I basically can access it from https://apps.facebook.com/myfbapp and after I login to FB it opens up with in Facebook. I'm using java (apache / tomcat) for my server side implementation and for simplicity sake let us say I just have an index.html and a authenticationfilter.java (which implements Filter) in my web application. I don't have any Facebook specific Javascript API (no FB.init() javascript or anything like that ) or code in my index.html. Whenever user accesses my canvas application I first get a request to my web application where I get the signed_request , oauth_token , FB user ID etc which I can use for my internal authentication, session creation etc. I have absolutely no issues with this canvas application and every thing works fine. Please note that when user accesses this app the request I get from the browser to my app server has the signed_request , user_id etc.
Now I wanted to make this app available on mobile devices as well and I thought, oh well all I need to do is add the mobile URL for this app in the mobile web app section in Facebook for the same myfbapp. I did that and as expected when I login to facebook from my android phone myfbapp is listed under the apps section, so far so good. The problem starts when I click on the app. I get the request on my app server but it doesn't contain the signed_request , user_id etc.. ????? I was expecting the mobile app to work the same way as the canvas app but apparently it doesn't or I'm doing some thing wrong.
Then I started reading more about facebook mobile app at http://developers.facebook.com/docs/guides/mobile/web/#register where it talks about adding various Facebook Javascript API's in the index.html (I never did anything like that in my canvas app) and then I started thinking , may be then mobile web app is more (or exactly) like a regular web app with FB connect and not like canvas application (meaning it doesn't really load with in Facebook) , is this true?
On mobile facebook you can not see any custom pages/tabs. They are apparently wokring on that at the moment.
So it will be different to a canvas app. Your mobile app will be a completely seperate site and page not in an iFrame on Facebook.
Some behaviour i discovered recently with Facebook Canvas / Page Tabs on mobile devices.
Maybe this helps to understand a little bit better how facebook behaves in mobile context.
Mobile Browser
Access App URL
Example URL http://apps.facebook.com/myapp/
Redirects to the configured mobile website under Settings > Website > Mobile Site URL and adds additional params /?ref=web_canvas&code=<signed_request_code_field>
About the signed_request code field
An OAuth Code which can be exchanged for a valid user access token via a subsequent server-side request
Access App Center
There is no way to access the Facebook App Center via the mobile browser.
Access Page Tab
Example URL http://facebook.com/a_facebook_page/custom_page_tab_url
Custom Page Tabs are not visible via the mobile browser.
Facebook Open Graph Search
Searching for myapp returns the link to the Facebook Canvas.
Same behaviour like Access App URL via Mobile Browser
Mobile Facebook Client
Access App URL
There is no way to access this url directly.
Access App Center
There is no way to access the Facebook App Center.
Access Page Tab
Example URL http://facebook.com/a_facebook_page/custom_page_tab_url
Custom Page Tabs are not visible via the mobile facebook client.
Facebook Open Graph Search
It says that this app is not compatible with this devices.
You need to register an iOS / Android App and send the user to this app to get rid of this error. Probably it helps the user if you add the link to the standalone application to the Facebook description of the app. Which should then be visible there.

Is there any dedicated facebook request for permission for facebook users of mobile browsers?

Is there any different in getting Request for Permission from Facebook Users between desktop browsers users and mobile browsers users?
for example:
https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream
When I check facebook developer documentation, I can't find info typically for getting permission from mobile browsers users.
I want to know whether I can still use my current OAuth authentication for mobile sites, to get tokens from mobile browsers users?
Any information that I am missing?
Thanks ahead.
Your current will work but there are dialogs which are more suitable for a mobile device, see below.
show a dialog to a user on a mobile device, change the subdomain of the dialog URL from www to m. Facebook will default to an appropriate view based on the user agent. To override that choice, you can explicitly specify one of two mobile display modes:
touch: Used on smartphone mobile devices, like iPhone and Android. Use this for tablets with small screens (i.e., under 7 inches) as well.
wap: Display plain HTML (without JavaScript) on a small screen, such as a Nokia 7500.
From: https://developers.facebook.com/docs/reference/dialogs/
Overview
FB.ui is a generic helper method for triggering Dialogs that access the Facebook Dialog API endpoint.
These include:
Publishing a story to the feed
Prompting the user to add a friend
**Prompting the user to authorize your application, or grant it permissions**
Prompting a payment
Prompting the user to send an application request to a friend
Prompting the user to share a link
https://developers.facebook.com/docs/reference/dialogs/
(sorry for the sloppy answer, in a hurry)