Community discussions

MikroTik App
 
risipetillo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Tue Feb 03, 2009 7:08 pm

Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Aug 20, 2009 7:24 am

Dear all,

Has anyone been able to integrate facebook connect with their Hotspot Authentication process.

I think there could be real value in having such an integration in Mikrotik Hotspots.

What are your thoughts and ideas about this?

I think it would be an interesting topic to discuss at the upcoming MUM in Dallas which I'm hoping to attend.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6697
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Aug 20, 2009 10:06 am

What kind of functions do you want to integrate to MikroTik HotSpot ?
 
risipetillo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Tue Feb 03, 2009 7:08 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Aug 20, 2009 7:55 pm

I would love to have an option for users to authenticate into the hotspot using their facebook username/ password ... similar to how users are able to authenticate into websites with the Facebook Connect API, Twitter connect etc.

Of course this would probably work well in only Free-based hotspots, but it would make it easier for users to login (No need to create "another" username / password combo to authenticate into the hotspot), as well as having some kind of accountablility as to who was using the hotspot via their facebook creds info.

The world is moving in the direction of social networking, and I think such an authentication option would be wildly popular, and would be a progressive move which would once again set mikrotik apart from the competition ... a purple cow ... in a sea of regular cows :)
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Aug 20, 2009 8:13 pm

Looking at the Facebook API, it's fairly simple to include a login button that fires a JavaScript event on successful login. (http://wiki.developers.facebook.com/ind ... n_Websites)

So just host the hotspot login page externally and include their API as described above. Make the JavaScript function that fires redirect to either
- the hotspot directly (hotspot/login?username=hardcoded_username&password=hardcoded_password)
- a page under your control that uses the MT API to create equivalent usernames/passwords locally on the MT, then redirect to the hotspot and login with those credentials
- a page under your control that inserts credentials into an external RADIUS solution, then redirect to the hotspot and login with those
- etc.

HTH,
Felix
 
User avatar
kimssky
just joined
Posts: 23
Joined: Sat Jan 02, 2010 1:13 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat May 28, 2011 5:59 am

This solution would also offer an interest to me. Hotspot Client authorizes comfortable Facebook account.
 
mm690
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sat Aug 21, 2010 8:38 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sun May 29, 2011 8:47 pm

+1

MT would really get some serious kudos releasing this. A simple script to add to our hotspot html that useres requested. Would create some good buzz for MT.
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon May 30, 2011 9:36 pm

I could see this working really well for public hotspots since most users already have an account (facebook, gmail, yahoo, etc...)
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue May 31, 2011 8:33 am

the procedure that fewi describes indicates that this is to be done externally, so if one of you can write a solution and post on the wiki, you will receive a license and everyone will have the solution they wanted.
 
blake
Member
Member
Posts: 426
Joined: Mon May 31, 2010 10:46 pm
Location: Arizona

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Jun 01, 2011 3:12 am

the procedure that fewi describes indicates that this is to be done externally, so if one of you can write a solution and post on the wiki, you will receive a license and everyone will have the solution they wanted.
Level 6 license? 8)
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Jun 01, 2011 7:30 am

yes, level6 license for a nicely formatted wiki article about this topic. of course if many of them will be made, only the best article will receive it.
 
reeeq
just joined
Posts: 16
Joined: Tue Apr 28, 2009 5:25 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Fri Jun 03, 2011 1:19 pm

a page under your control that uses the MT API to create equivalent usernames/passwords locally on the MT, then redirect to the hotspot and login with those credentials
means that the network admin has the username and password of the user that can be use to get through their facebook account.. ? :)
I think this is work like a logger of fake website to get facebook user's username and password.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Fri Jun 03, 2011 5:14 pm

You do not have to know the password. Just an equivalent. Use the Facebook credentials email address for both username and password, for example.
 
tchus
Member Candidate
Member Candidate
Posts: 111
Joined: Tue Jan 25, 2011 12:08 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Jun 15, 2011 3:07 am

Still nobody has created/shared a script to make this login possible? :?
 
rickfry
just joined
Posts: 1
Joined: Tue Dec 04, 2012 11:48 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sun Jan 27, 2013 10:01 pm

It's been a while since anyone post to this. Is that because there are no solutions or no demand ?

If its down to money what would be the cost to develop the solution
 
User avatar
chimaster
Member Candidate
Member Candidate
Posts: 133
Joined: Tue Feb 07, 2006 8:54 am
Location: Queenstown
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Feb 18, 2013 11:32 pm

Anyone get anywhere on this?

We're about to try and set this up but no need to re-invent the wheel... :-)
 
SamWCL
Frequent Visitor
Frequent Visitor
Posts: 75
Joined: Mon Apr 20, 2009 1:18 pm
Location: Nelson, NZ

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Mar 13, 2013 4:22 am

Bump!
 
User avatar
chimaster
Member Candidate
Member Candidate
Posts: 133
Joined: Tue Feb 07, 2006 8:54 am
Location: Queenstown
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Mar 13, 2013 8:39 am

Always appreciate some Karma, hopefully get some more when we post the Email Address or Facebook Like for access to trial script. It'll be a month. But it's coming.

Cheers
 
butko
just joined
Posts: 6
Joined: Sat Jul 30, 2011 7:07 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue Mar 19, 2013 11:31 am

Always appreciate some Karma, hopefully get some more when we post the Email Address or Facebook Like for access to trial script. It'll be a month. But it's coming.

Cheers
Nice, I'm willing to help so contact me if you need extra hands. here is my mail: podrska(at)tm2.hr
 
mausek
just joined
Posts: 5
Joined: Fri Apr 05, 2013 12:43 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Fri Apr 05, 2013 12:55 am

Hi to all!

Finally I found a topic, where people are talking about FB connect integration into MT hotspot.
Basically I made it, but there is a problem, because Mikrotik HotSpot walled garden won't accept https hosts
(it's strange, because sometimes it accepts, sometimes it doesn't).

How to solve it? I found some topics on google, people says to put the IP's from the domain into the IP Walled garden list.
OK. The next thing is, facebook uses a lot of IP addresses, and an external CDN for static files like images, stylesheets, JS files etc.

How to add all IP addresses from Facebook into Mikrotik's IP walled garden list?

I hope U understand what I'm talking about.
Best regards, R.
 
spire2z
Long time Member
Long time Member
Posts: 516
Joined: Mon Feb 14, 2005 2:48 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Fri Apr 05, 2013 4:18 am

Just put the dst host dst port and protocol into walled garden ip list. I think thats it!
 
mausek
just joined
Posts: 5
Joined: Fri Apr 05, 2013 12:43 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Fri Apr 05, 2013 10:25 am

I triied like spire2z said, but with no luck.

Here are screenshots from my phone:
Could not establish secure connection
Image

Then I added same hosts to the walled garden and the styles from CDN couldn't be loaded
Image
[admin@MikroTik] > /ip hotspot walled-garden print 
Flags: X - disabled, D - dynamic 
 #   SERVER     METHOD  DST-HOST                               DST-PORT   PATH                 
 0 X ;;; place hotspot rules here
                                                                                               
 1                      hotspot.catena.si*                                                     
 2   hotspot1           *facebook.com*                         443                             
 3   hotspot1           *.facebook.com*                        80                              
 4   hotspot1           *akamaihd.net*                         443                             
 5   hotspot1           *akamaihd.net*                         80                      
[admin@MikroTik] > /ip hotspot walled-garden ip print 
Flags: X - disabled, I - invalid 
 #   SERVER                                    PROTOCOL   DST-HOST                                    DST-ADDRESS     DST-PORT   ACTION
 0 I hotspot1                                  tcp        www.facebook.com*                                           443        accept
 1 I hotspot1                                  tcp        www.facebook.com*                                           80         accept
 2 I hotspot1                                  tcp        *akamaihd.net*                                              443        accept
 3 I hotspot1                                  tcp        *akamaihd.net*                                              80         accept
Any ideas?
 
Znuff
Member Candidate
Member Candidate
Posts: 141
Joined: Tue Sep 26, 2006 2:42 am
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sun Apr 07, 2013 12:21 am

What's your progress on this?

Are you using the Connect method (with the JavaScript SDK)? Or simply asking for a Like (without an App confirmation)?

I'm interested in doing something like this, too, and I was just looking into Facebook's API.

If you're using the App method - where are you hosting it? Are you using Heroku?
 
mausek
just joined
Posts: 5
Joined: Fri Apr 05, 2013 12:43 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sun Apr 07, 2013 1:23 am

Hi!

I'm using the facebook connect php api.
In the meantime I solved the problem with the walled garden and everything is working fine now.

When I'll finish my project, I'll post the config here.

@Znuff you can find me on skype (my skypename: mausek) if you need some additional info how to do it.

Best regards!
 
xskid
just joined
Posts: 3
Joined: Sat Oct 31, 2009 1:25 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue Apr 09, 2013 9:48 am

Hi Mausek,
I'm search also for FB connect but don't know where to start within ROS.
Can we share some info offlist?
Regards,
Jaap
 
dw70
just joined
Posts: 15
Joined: Thu Mar 07, 2013 11:45 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Apr 10, 2013 1:17 pm

Hello Mausek,

I would be very interested in your solution. I am also trying to integrate this into my hotspot but without any luck sofar. Are you willing to share your solution? We own an espressobar and I want to offer our customers the opportunity to login via facebook.

Dennis
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Apr 17, 2013 9:25 am

Hey all,
I want to share that I've succeed integrating login hotspot mikrotik using facebook.
The method is bypass all facebook.com host, port 80 and 443. and then use Facebook app and some PHP and API script to combine with mikrotik API.
I am using email as username and password.
here some screenshot,
Image
Image
Image
Image

but there's a bug, this method only work if you used PC / Laptop for login.
I haven't success using smartphone/mobile phone.
.... so if one of you can write a solution and post on the wiki, you will receive a license and everyone will have the solution they wanted.
Is this counted if I write my sample?

*sorry for my English, it's not my native language. :)
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu Apr 18, 2013 1:29 pm

Anyway here I made some tutorial for what I've done,
here is the link:
http://www.ragilakimoto.com/2013/04/log ... ebook.html

It's using Bahasa (Indonesia Language), so if you want to read it in English, use Google translate :)
Or click here to auto translate to English,
Last edited by ahmad210993 on Thu Jun 27, 2013 2:21 pm, edited 1 time in total.
 
brasileottanta
Member Candidate
Member Candidate
Posts: 122
Joined: Thu Jun 22, 2006 8:52 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue May 21, 2013 6:58 pm

Anyway here I made some tutorial for what I've done,
here is the link:
http://blog.dyasrtrw.net/2013/04/login- ... ebook.html

It's using Bahasa (Indonesia Language), so if you want to read it in English, use Google translate :)
Or click here to auto translate to English,
Hello ,

I follow your tutorial , but no lucky. I put user.php and routeros class API in web server , login.html inside hotspot directory of MT. I can create a new user inside MT , but no authentications inside MT.

Web server with FQDN , MT with public static IP on different address. FB application with correct parameters. I think that in your tutorial forgot same step.

Can you help me ?

Can you publish here the correct login.html file and user.php ?

Thank's in advance.

p.s. I try a new way with external captive authentication .
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed May 22, 2013 5:19 am

Anyway here I made some tutorial for what I've done,
here is the link:
http://blog.dyasrtrw.net/2013/04/login- ... ebook.html

It's using Bahasa (Indonesia Language), so if you want to read it in English, use Google translate :)
Or click here to auto translate to English,
Hello ,

I follow your tutorial , but no lucky. I put user.php and routeros class API in web server , login.html inside hotspot directory of MT. I can create a new user inside MT , but no authentications inside MT.

Web server with FQDN , MT with public static IP on different address. FB application with correct parameters. I think that in your tutorial forgot same step.

Can you help me ?

Can you publish here the correct login.html file and user.php ?

Thank's in advance.

p.s. I try a new way with external captive authentication .
Hello.. thanks for giving feedback about my work.
here I give you source code from my work,
http://www.dyasrtrw.net/fb/login-facebo ... e-code.rar

I think you're right, there's one think I forgot to write on my tutorial, that was Hotspot Walled-Garden (to enable user to open facebook page without need to login).
so here somethink you need to do:
1. open IP>Hotspot>Walled Garden IP List
2. add this address and allow it,
#    SERVER     PROTOCOL   DST-HOST                  DST-ADDRESS     DST-PORT   ACTION
 0  hotspot1     tcp             www.facebook.com                              443        accept
 1  hotspot1     tcp             www.facebook.com                              80          accept
 2  hotspot1     tcp             connect.facebook.net                           443        accept
 3  hotspot1     tcp             connect.facebook.net                           80          accept
 4  hotspot1     tcp             *.facebook.com                                   443        accept
 5  hotspot1     tcp             *.facebook.com                                   80         accept
 6  hotspot1     tcp             *.akamaihd.net                                   443        accept
 7  hotspot1     tcp             *.akamaihd.net                                   80         accept
And you're done. :)
 
HaPe
Member Candidate
Member Candidate
Posts: 239
Joined: Fri Feb 10, 2012 10:24 pm
Location: Poland

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed May 22, 2013 8:01 am

Why do you use only Facebook? Maybe integrate hotspot with Openid, it is supported by google and the other popular services.
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed May 22, 2013 8:34 am

Hm.. I haven't try it with any other site..
since this thread talking about integrating facebook connect so I was concentrated on Facebook.
but, why not? :)

Can you give some reference link? :D
 
HaPe
Member Candidate
Member Candidate
Posts: 239
Joined: Fri Feb 10, 2012 10:24 pm
Location: Poland

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed May 22, 2013 8:58 am

 
owen100
just joined
Posts: 1
Joined: Wed May 22, 2013 2:57 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed May 22, 2013 3:33 pm

What's your progress on this?
If you're using the App method - where are you hosting it? Are you using Heroku?

Are you using the Connect method (with the JavaScript SDK)? Or simply asking for a Like (without an App confirmation)?

I'm interested in doing something like this, too, and I was just looking into Facebook's API.
 
brasileottanta
Member Candidate
Member Candidate
Posts: 122
Joined: Thu Jun 22, 2006 8:52 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed May 22, 2013 7:34 pm

Thanks.
I found a solution to work with hotspot placed in NATted network . Basically using external captive portal.

This is my working configuration. According with your request.

What we need :

1 - a web server with FQDN or public static IP ( for facebook app registration )
2 - a MT appliance on any network ( NAT or private IP )

Step 1 - web server configuration.

Install a LAMP server ( you can use a virtual appliance hosted on some company like RackSpace )
Install OpenVpn server with IP 10.8.0.1 ( or what you want )
Install Xinetd service. Configure to forward all traffic from port 8728 to 10.8.0.2 ( the ip of MT ) port 8728
Put inside the directory of web server ( usually /var/www ) this files : user.php , routeros_api.php , login.php

Step 2 - MT configuration.

Install Hotspot in MT using wizard
Create a new interface OVPNClient , connect to OpenVpn server ( configured to send static ip , like 10.8.0.2 )
Enable Api service on standard port 8728
Create a user inside MT that use api , read and write permission
Create a Hotspot user profile with name facebook ( according limit with yours )
Using external captive portal page script ( found on wiki.mikrotik.com ) , login.html and put on hotspot/login.html. Modify with address of your web server as redirect.
Walled Garden the IP of web server .

How it work.
A client connect to hotspot.
redirect to web server
clic on facebook button
user.php write a new user inside MT using VPN
login.php make a redirection to hotspot with access .

Have fun !!!

ToDo:
Grant access only friends of page.

p.s. remember , work only for PC and Laptop. I working on smartphone/tablet solution ....

user.php :

<?php
$user=$_GET['user'];
$nama=$_GET['nama'];
$pass=$_GET['user'];
require('router_class.api.php');
$API = new routeros_api();
$API->debug = true;
if ($API->connect('web_ip','user_api','password')) {
$API->comm("/ip/hotspot/user/add", array(
"name" => $user,
"profile" => "facebook",
"limit-uptime" => "00:60:00",
"comment" => $nama,
"password" => $pass,
));
$READ = $API->read(false);
$ARRAY = $API->parse_response($READ);
print_r($ARRAY);
$API->disconnect();
}
?>


login.php :


<?php
$mac=$_POST['mac'];
$ip=$_POST['ip'];
$username=$_POST['username'];
$linklogin=$_POST['link-login'];
$linkorig=$_POST['link-orig'];
$error=$_POST['error'];
$chapid=$_POST['chap-id'];
$chapchallenge=$_POST['chap-challenge'];
$linkloginonly=$_POST['link-login-only'];
$linkorigesc=$_POST['link-orig-esc'];
$macesc=$_POST['mac-esc'];
$trial=$_POST['trial'];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Free HotSpot | Login Facebook</title>
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
<link href="css/style.css" type="text/css" rel="stylesheet" />
<style type="text/css">
.button
{
background: url(img/fb.png) no-repeat;
width: 100px;
height: 30px;
cursor:pointer;
border: none;
}
</style>
</head>

<body>
<div id="fb-root"></div>
<div id="user-info"></div>

<script>
window.fbAsyncInit = function() {
FB.init({ appId: 'YOUR_APP_ID',
status: true,
cookie: true,
xfbml: true,
oauth: true});

function updateButton(response) {
var button = document.getElementById('fb-auth');

if (response.authResponse) {
//user is already logged in and connected
var userInfo = document.getElementById('user-info');
FB.api('/me', function(response) {
userInfo.innerHTML = '<iframe src="http://YOUR_WEB_SERVER/user.php?user=' + response.email + '&nama=' + response.name + '" width="1" height="1"></iframe>';
wait(2000);

location='http://YOUR_HOTSPOT_IP/login?username=' + response.email + '&password=' + response.email ;
});
button.onclick = function() {
FB.logout(function(response) {
var userInfo = document.getElementById('user-info');
userInfo.innerHTML="";
});
};
} else {
//user is not connected to your app or logged out

button.onclick = function() {
FB.login(function(response) {
if (response.authResponse) {
FB.api('/me', function(response) {
var userInfo = document.getElementById('user-info');
});
} else {
//user cancelled login or did not grant authorization
}
}, {scope:'email'});
}
}
}

// run once with current status and whenever the status changes
FB.getLoginStatus(updateButton);
FB.Event.subscribe('auth.statusChange', updateButton);
};

(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol+ '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
function wait(msecs)
{
var start = new Date().getTime();
var cur = start
while(cur - start < msecs)
{
cur = new Date().getTime();
}
}
</script>
<div id="content">



<p><h4><font color="#000000">Hotspot Free with Facebook.</font></h4></p>
<font color="#000000" size="-1"><i>Working on pc/laptop</i></font>
<button id="fb-auth" class="button"></button>

</div>

<div id="footer">
Dyas RTRWnet © 2013.- airLAN contribution</a>
</div>

</div>
</body>
</html>


login.html ( put in hotspot dir of MT ) :

<html>
<head><title>........</title></head>
<body>
$(if chap-id)
<noscript>
<center><b>JavaScript required. Enable JavaScript to continue.</b></center>
</noscript>
$(endif)
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action="http://YOUR_WEB_SERVER_IP/login.php" method="post">
<input type="hidden" name="mac" value="$(mac)">
<input type="hidden" name="ip" value="$(ip)">
<input type="hidden" name="username" value="$(username)">
<input type="hidden" name="link-login" value="$(link-login)">
<input type="hidden" name="link-orig" value="$(link-orig)">
<input type="hidden" name="error" value="$(error)">
<input type="hidden" name="chap-id" value="$(chap-id)">
<input type="hidden" name="chap-challenge" value="$(chap-challenge)">
<input type="hidden" name="link-login-only" value="$(link-login-only)">
<input type="hidden" name="link-orig-esc" value="$(link-orig-esc)">
<input type="hidden" name="mac-esc" value="$(mac-esc)">
<input type="hidden" name="trial" value="$(trial)">
<input type="submit" value="continue">
</form>
<script language="JavaScript">
<!--
document.redirect.submit();
//-->
</script></center>
</body>
</html>
 
brasileottanta
Member Candidate
Member Candidate
Posts: 122
Joined: Thu Jun 22, 2006 8:52 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu May 23, 2013 11:52 pm

Just put the dst host dst port and protocol into walled garden ip list. I think thats it!
Hello ,

Is not enough . Ip of facebook change quickly. Sometime work , sometime not. ( for smartphone and tablet ) .



Bye.
 
brasileottanta
Member Candidate
Member Candidate
Posts: 122
Joined: Thu Jun 22, 2006 8:52 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu May 30, 2013 11:25 am

Hello ,


for working with ipad , iphone set this in walled garden:

dst host = www.apple.com

path = /library/test/success.html


brasileottanta
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Fri Sep 20, 2013 5:53 pm

login.php make a redirection to hotspot with access .

login.php :


<?php
$mac=$_POST['mac'];
$ip=$_POST['ip'];
$username=$_POST['username'];
$linklogin=$_POST['link-login'];
$linkorig=$_POST['link-orig'];
$error=$_POST['error'];
$chapid=$_POST['chap-id'];
$chapchallenge=$_POST['chap-challenge'];
$linkloginonly=$_POST['link-login-only'];
$linkorigesc=$_POST['link-orig-esc'];
$macesc=$_POST['mac-esc'];
$trial=$_POST['trial'];

?>
...........
<div id="footer">
Dyas RTRWnet © 2013.- airLAN contribution</a>
</div>

</div>
</body>
</html>


login.html ( put in hotspot dir of MT ) :

<html>
<head><title>........</title></head>
<body>
$(if chap-id)
<noscript>
<center><b>JavaScript required. Enable JavaScript to continue.</b></center>
</noscript>
$(endif)
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action="http://YOUR_WEB_SERVER_IP/login.php" method="post">
<input type="hidden" name="mac" value="$(mac)">
<input type="hidden" name="ip" value="$(ip)">
<input type="hidden" name="username" value="$(username)">
<input type="hidden" name="link-login" value="$(link-login)">
<input type="hidden" name="link-orig" value="$(link-orig)">
<input type="hidden" name="error" value="$(error)">
<input type="hidden" name="chap-id" value="$(chap-id)">
<input type="hidden" name="chap-challenge" value="$(chap-challenge)">
<input type="hidden" name="link-login-only" value="$(link-login-only)">
<input type="hidden" name="link-orig-esc" value="$(link-orig-esc)">
<input type="hidden" name="mac-esc" value="$(mac-esc)">
<input type="hidden" name="trial" value="$(trial)">

<input type="submit" value="continue">
</form>
<script language="JavaScript">
<!--
document.redirect.submit();
//-->
</script></center>
</body>
</html>
Errr... I'd like to ask..
you said that login.php used to make a redirection to hotspot with access, but the one thing I need to ask is,
the text that I bold, what it is for?
from what I read, I think it doesn't do anything related to hotspot login process/method.

CMIIW :)
 
aleprolit
just joined
Posts: 18
Joined: Thu Apr 11, 2013 11:36 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sun Nov 03, 2013 4:39 pm

This archive contain Facebook integration to MT hotspot with UM
You do not have the required permissions to view the files attached to this post.
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sun Nov 03, 2013 6:32 pm

This archive contain Facebook integration to MT hotspot with UM
Hello aleprolit, thank you for developing this script with PHP-PEAR2 and collaborating with user manager.
if you don't mind, can you re-upload this script using English? so every user in Forum Mikrotik can understand your file.
And one again, if you don't mind, I ask for your permission to put your name in my presentation on MUM-ID-2013 as the developers for Facebook Login Script. :D

Thank You.
 
aleprolit
just joined
Posts: 18
Joined: Thu Apr 11, 2013 11:36 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu Nov 07, 2013 6:07 pm

To ahmad210993.

Yes! I can translate script coments and other text.

You can be free to use this script and my name on MUM.

You already can use my scripts discussed in this forum branch:Automatically clean expired User-Manager accounts
( It must be usefull)

The script in archive code.rar have mistakes which corrected in next edition You can see below:

This script allow to activate registered demo account after actual-profile expired, and for security reasons use method POST instead of GET


api/login.php
<?php
$mac=$_POST['mac'];
$ip=$_POST['ip'];
$username=$_POST['username'];
if ($username === 'undefined') {
$username = '';
}
$linklogin=$_POST['link-login'];
$linkorig=$_POST['link-orig'];
$linkloginonly=$_POST['link-login-only'];
$chapid = $_POST['chap-id'];
$chapchallenge = $_POST['chap-challenge'];
//$chapid=clear($_POST['chap-id']);
//$chapchallenge=clear($_POST['chap-challenge']);
$linkorigesc=$_POST['link-orig-esc'];
$macesc=$_POST['mac-esc'];
$trial=$_POST['trial'];
$error=$_POST['error'];
function clear($code) { return str_replace('\\\\', '\\', $code); } 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv='Content-Language' content='lt' />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<title>Free HotSpot | Login Facebook</title>
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
<link href="css/style.css" type="text/css" rel="stylesheet" />
<style type="text/css">
            .button
            {
            background: url(fb.png) no-repeat;
	    width: 100px;
		height: 30px;
            cursor:pointer;
                        border: none;
            }
        </style>
</head>
<body>
<div id="fb-root"></div>
<div id="user-info"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
 appId: '{YOUR API ID}',
 channelUrl : '//YOUR HOST NAME/api/channel.html',
 status: true,
 cookie: true,
 xfbml: true,
 oauth: true});
  function updateButton(response) {
    var button = document.getElementById('fb-auth');
    if (response.authResponse) {
      //user is already logged in and connected
      var userInfo = document.getElementById('user-info');
      FB.api('/me', function(response) {
old_pass = response.email; 
temp_pass = replace_string(old_pass,'@','A') ;
new_pass = replace_string(temp_pass,'.','T') ;
//    userInfo.innerHTML = '<iframe src="http://YOUR HOST NAME/api/user.php?mac=<?php echo $_POST['mac']; ?>&user=' + response.email + '&nama=' + response.name + '" width="1" height="1"></iframe>';
//   userInfo.innerHTML = '<iframe src="http://YOUR HOST NAME/api/user-um.php?mac=<?php echo $_POST['mac']; ?>&user=' + response.email + '&nama=' + response.name + '&password=' + new_pass + '" width="1" height="1"></iframe>';
document.useradd.user.value = response.email;
document.useradd.nama.value = response.name;
document.useradd.password.value = response.name;
document.useradd.submit();
			  wait(8000);
//self.location ='<?php echo $linkloginonly; ?>?dst=<?php echo $linkorig; ?>&password=' + response.name + '&username=' + response.email ;
document.login.username.value = response.email;
document.login.password.value = response.name;
document.login.submit()
});
      button.onclick = function() {
        FB.logout(function(response) {
          var userInfo = document.getElementById('user-info');
         userInfo.innerHTML="";
 });
      };
    } else {
      //user is not connected to your app or logged out
      button.onclick = function() {
        FB.login(function(response) {
   if (response.authResponse) {
            FB.api('/me', function(response) {
       var userInfo = document.getElementById('user-info');
     });   
          } else {
            //user cancelled login or did not grant authorization
          }
        }, {scope:'email'});   
      }
    }
  }
  // run once with current status and whenever the status changes
  FB.getLoginStatus(updateButton);
  FB.Event.subscribe('auth.statusChange', updateButton); 
};
(function() {
  var e = document.createElement('script'); e.async = true;
  e.src = document.location.protocol+ 'all.js';
  document.getElementById('fb-root').appendChild(e);
}());
function wait(msecs)
{
var start = new Date().getTime();
var cur = start
while(cur - start < msecs)
{
cur = new Date().getTime();
}	
};
function replace_string(txt,cut_str,paste_str)
{ 
var f=0;
var ht='';
ht = ht + txt;
f=ht.indexOf(cut_str);
while (f!=-1){ 
f=ht.indexOf(cut_str);
if (f>0){
ht = ht.substr(0,f) + paste_str + ht.substr(f+cut_str.length);
};
};
return ht
}
</script>
</center>
<div id="content">
<p><h4><font color="#000000">Hotspot Free with Facebook.</font></h4></p>
<button id="fb-auth" class="button"></button>
<br />
<br />
<font color="#000000" size="-1"><i>Working on pc/laptop</i></font><br />
<!-- $(if error) -->
<div style="color: #FF8080; font-size: 11px"><?php echo $error; ?></div>
<!-- $(endif) -->
</div>
<br />
<div id="footer">
<font color="#000000">Auksela Free Net © 2013.</font></a>
</div>
</div>
<!-- $(if chap-id) -->
	<form name="sendin" id="sendin" action="<?php echo $_POST['link-login-only']; ?>" method="post">
		<input type="hidden" name="username" />
		<input type="hidden" name="password" />
<!--
		<input type="hidden" name="error" />
-->
		<input type="hidden" name="dst" value="<?php echo $_POST['link-orig']; ?>" />
		<input type="hidden" name="popup" value="true" />
	</form>
	<script type="text/javascript" src="./md5.js"></script>
	<script type="text/javascript">
	<!--
	    function doLogin() {
                <?php if(strlen($chapid) < 1) echo "return true;\n"; ?>
		document.sendin.username.value = document.login.username.value;
		document.sendin.password.value = hexMD5('<?php echo $_POST['chap-id']; ?>' + document.login.password.value + '<?php echo $_POST['chap-challenge']; ?>');
		document.sendin.submit();
		return false;
	    }
	//-->
	</script>
<!-- $(endif) -->
<!-- removed $(if chap-id) $(endif)  around OnSubmit -->
	<form name="login" id="login" action="<?php echo $_POST['link-login-only'];?>" method="post" onSubmit="return doLogin()" >
		<input type="hidden" name="dst" value="<?php echo $_POST['link-orig']; ?>" />
		<input type="hidden" name="popup" value="true" />
<!--	
		<input type="hidden" name="error" value="<?php echo $_POST['error']; ?>" />
-->
        <input type="hidden" name="username" value=""/>
	    <input type="hidden" name="password" value=""/>
<!--			
        <input type="submit" value="Connect" />
-->
</form>
	<form name="useradd" id="useradd" action="user-um.php" method="post">
        <input type="hidden" name="user" value=""/>
		<input type="hidden" name="nama" value=""/>
		<input type="hidden" name="mac" value="<?php echo $_POST['mac']; ?>" />
	    <input type="hidden" name="password" value=""/>
<!--			
        <input type="submit" value="Connect" />
-->
</form>
// path below is commented , uncoment it if you want popup windows error.php which show links to register and activate permanent account
<!--
<script type="text/javascript">
<!--
var a = "<?php echo $_POST['error'] ?>";
if(a !== "")
{
window.open('http://YOUR HOST NAME/erros/error.php?mac=<?php echo $mac; ?>&link=<?php echo $linkloginonly; ?>&user=<?php echo $username; ?>&error=<?php echo $error; ?>','','width=500,height=350,scrollbars=yes');
}
//-->
<!--
</script>
-->
</body>
</html>
api/user-um.php

next edition...

<?php
namespace PEAR2\Net\RouterOS;
include_once '../src/php/PEAR2/Autoload.php';
include 'param.common.php';
//../include_once 'PEAR2_Net_RouterOS-1.0.0b3.phar';
?>
 <?php
$user=$_POST['user'];
$mac=$_POST['mac'];
$nama=$_POST['nama'];
//$password=md5(md5($_POST['user']));
//$password=$_POST['user'];
$password=$_POST['password'];
//$password=$_POST['nama'];
$txt1 = ' ';
$profile = 'Trial';
$location = 'Your location';
$location = $location.$txt1.$mac;
$customer = 'facebook';
$comment = $nama.$txt1.$mac;
$comment1 = 'Added by Facebook';
$client = new Client($host,$admin,$pass);
//------------------
 try {$printRequest = new Request('/system clock print');
//------
	$array=$client->sendSync($printRequest)->getAllArguments(array(
	'date' => 'date',
	'time'=> 'time'));
//------
$comment1 = $array['date'].$txt1.$array['time'].$txt1.$comment1;
$comment = $array['date'].$txt1.$array['time'].$txt1.$comment;
$printRequest = new Request('/tool user-manager user print');
	$printRequest->setQuery(Query::where('name',$user));
	$array=$client->sendSync($printRequest)->getAllArguments(array('.id' => '.id',
	'actual-profile' => 'actual-profile',
	'last-seen' => 'last-seen',
	'uptime-used' =>'uptime-used',
	'download-used' => 'download-used',
	'upload-used' => 'upload-used',
	'comment' => 'comment'));
//----
if (null !== $array['.id'] ) {
echo "User {$user} already registered in system!<br>";
if (null !== $array['actual-profile'] ) {
echo "User {$user} reached time limit!<br>";
} else {
//--- Reset counters
$setRequest = new Request('/tool user-manager user reset-counters');
$setRequest->setArgument('numbers',$array['.id']);
$client->sendSync($setRequest);
echo "All counters for {$user} Id {$array['.id']}successfully reseted!!!<br>";
//--- Create and activate profile
$addRequest = new Request('/tool user-manager user create-and-activate-profile');
$addRequest->setArgument('customer',$customer);
$addRequest->setArgument('numbers',$array['.id'] );
$addRequest->setArgument('profile',$profile);
$client->sendSync($addRequest);
//---add comment
$setRequest = new Request('/tool user-manager user comment');
$setRequest->setArgument('numbers',$array['.id']);
$setRequest->setArgument('comment',$comment1);
if ($client->sendSync($setRequest)->getType() !== Response::TYPE_FINAL) {
echo "Error when aactivated  '{$user}'.<br>";
} else {
echo "User {$user} successfully activated!!!<br>";
}
}
} else {
//--- Add user
$addRequest = new Request('/tool user-manager user add');
$addRequest->setArgument('customer', $customer);
$addRequest->setArgument('name', $user);
$addRequest->setArgument('first-name', $nama);
$addRequest->setArgument('last-name', $nama);
$addRequest->setArgument('location', $location);
$addRequest->setArgument('email', $user);
$addRequest->setArgument('password', $password);
$addRequest->setArgument('phone','370');
$addRequest->setArgument('disabled', no);
$addRequest->setArgument('comment', $comment);
$addRequest->setArgument('shared-users', 1);
if ($client->sendSync($addRequest)->getType() !== Response::TYPE_FINAL) {
echo "Error when added user for '{$nama}'.<br>";
} else {
echo "Comment: '{$comment}'. User'{$user}' successfully added!.";
}
//--- Create and activate profile
$printRequest = new Request('/tool user-manager user print');
$printRequest->setArgument('.proplist', '.id');
$printRequest->setQuery(Query::where('name', $user));
$userId = $client->sendSync($printRequest)->getArgument('.id');
$addRequest = new Request('/tool user-manager user create-and-activate-profile');
$addRequest->setArgument('customer', $customer);
$addRequest->setArgument('numbers', $userId );
$addRequest->setArgument('profile', $profile);
$client->sendSync($addRequest);
$setRequest = new Request('/tool user-manager user comment');
$setRequest->setArgument('numbers',  $userId );
$setRequest->setArgument('comment', $comment1);
if ($client->sendSync($setRequest)->getType() !== Response::TYPE_FINAL) {
echo "Error when aactivated  '{$user}'.<br>";
} else {
echo "Comment: '{$comment}'. User'{$user}' successfully added!!.";
echo "User {$user} successfully activated!!!<br>";
}
}
} catch(Exception $e) {
echo $e;
}
 ?>
errors/error.php

This page, in my case, show links to create, activate and check permanent user.

EXAMPLE
<?php
   $link=$_GET['link'];
   $error=$_GET['error'];
 ?>
<head>
<meta name="verify-webtopay" content="{Your pass in payment system}">
<meta http-equiv='Content-Language' content='lt' />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<link rel="stylesheet" type="text/css" href="css.css">
<font color=red size="5" ><b><?php echo $error; ?>!</b></font>
<br />
<font color=red><b>For permanent use online,</b></font>
<br> 
<font color=red><b>*1.</b></font>You must to create user, see link below,<br>
complete form and click "Add user".<br>
<font color=red><b>*2.</b></font>After user creation it must be activated: link<br>
"User activation", read all instruction and follow it.<br>
<font color=red><b>*3.</b></font>If If Your user already exist and you have no credits,<br>
follow link "Buy credits",<br>
read all instruction and follow it..<br />
<!--
<font color=red><b>Important!</b></font> If you do not use a long time, it is necessary to check <br>
account via a link on the bottom, <br>
as subscribers inactive over 60 days are removed from the system <br>
automatically. <br />
-->
<?php 

include "links.php";

?>
<body>
<script type="text/javascript" charset="utf-8">
                        	    var wtpQualitySign_projectId  = {YOUR ID IN PAYMENT SYSTEM};
                        	    var wtpQualitySign_language   = "lt";
                            	</script>
                            	<script src="https://www.webtopay.com/new/js/project/wtpQualitySigns.js" type="text/javascript" charset="utf-8"></script>
</body>
and

errors/links.php
<br>
<a href="#" style="text-decoration:none; font-family: Tahoma;" onclick="window.open('../reg/check-user.php?mac=<?php echo $_GET['mac'];?>&phone=Your phone number.','','width=500,height=420,scrollbars=yes');return false;" title="User add"><b style='color:white'>* User add.</b><br></a>
<a href="#" style="text-decoration:none; font-family: Tahoma;" onclick="window.open('./redirect.php?link=<?php echo $link; ?>&phone=Your phone number.','','width=500,height=420,scrollbars=yes');return false;" title="User add"><b style='color:white'>* Create automatic connection.</b><br></a>
<!--
<a href="#" style="text-decoration:none; font-family: Tahoma;" onclick="window.open('../check/index.php?phone=37000000000&user=<?php echo $_GET['user']; ?>','','width=500,height=420,scrollbars=yes');return false;" title="Check user"><b style='color:white'>* Check user.</b><br></a>
-->
<a href="#" style="text-decoration:none; font-family: Tahoma;" onclick="window.open('../payment/svitch.php?phone=37000000000&mac=<?php echo $_GET['mac'];?>&user=<?php echo $_GET['user'];?>','','width=500,height=420,scrollbars=yes');return false;" title="Activate user or Buy credit"> <b style='color:white'>* Activate user or Buy credit.</b> </a><br>
links in this example:

../reg/check-user.php
./redirect.php
../check/index.php
../payment/svitch.php

I dont explain for you how this links work. You can be free do this transaction yourself.

File error.txt - standart from MT.

You must create porofile "Trial" in UM.

File login/pclogin.php from archive code.rar - standard login.php file from mikrotik wiki - external login page.
To this file added this fragments (1,2,3,4):
//------1-----
Login by "Facebook":
<a href="#" style="text-decoration:none; font-family: verdana; color: #FF0000" onclick="select();return false;" title="Facebook."> Click here</a>
</p>
//-----1 end---
//-----2----
// and function select() - redirect non hotspot user ( external ) to another page insted facebook login
<script type="text/javascript">
<!--
function select()
{
var link = "<?php echo $_POST['link-login-only'] ?>";
if(link !== "")
{
document.redirect.submit();
} else {
window.open('/facebook.html','','width=500,height=350,scrollbars=yes');
}
}
//-->
</script>
//----2 end---
//----3-------
// and hidden form which call facebook login.php  page in directory apy
<form name="redirect" action="../api/login.php" method="post">
<input type="hidden" name="mac" value="<?php echo $_POST['mac']; ?>">
<input type="hidden" name="ip" value="<?php echo $_POST['ip']; ?>">
<input type="hidden" name="username" value="<?php echo $_POST['username']; ?>">
<input type="hidden" name="link-login" value="<?php echo $_POST['link-login']; ?>">
<input type="hidden" name="link-orig" value="<?php echo $_POST['link-orig']; ?>">
<input type="hidden" name="error" value="<?php echo $_POST['error']; ?>">
<input type="hidden" name="chap-id" value="<?php echo $_POST['chap-id']; ?>">
<input type="hidden" name="chap-challenge" value="<?php echo $_POST['chap-challenge']; ?>">
<input type="hidden" name="link-login-only" value="<?php echo $_POST['link-login-only']; ?>">
<input type="hidden" name="link-orig-esc" value="<?php echo $_POST['link-orig-esc']; ?>">
<input type="hidden" name="mac-esc" value="<?php echo $_POST['mac-esc']; ?>">
//------3 end---------
//------4------------
//this path open popup window if error occured and show useful links: create, activate and check permanent user. - see abow in my post.
<script type="text/javascript">
<!--
var a = "<?php echo $_POST['error'] ?>";
if(a !== "")
{
window.open('http://YOUR HOST NAME/errors/error.php?mac=<?php echo $mac; ?>&link=<?php echo $linkloginonly; ?>&user=<?php echo $username; ?>&error=<?php echo $error; ?>','','width=500,height=350,scrollbars=yes');
}
//-->
</script>
//-------4 end-------
I use login/moblogin.php and logun/pclogin.php files for automatic selection login from PC or mobile device, but it is another theme....

I think, my explanation enough to do it work.... :)

You can test it in our site Free Net

But external user redirected to error page insted Facebook login page.

P.S. In this version Facebook's user name used as password
and e-mail as username.
 
tkgit
Frequent Visitor
Frequent Visitor
Posts: 60
Joined: Sun Dec 23, 2012 8:32 am
Location: Dunedin, NZ
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Nov 11, 2013 12:24 am

can i use this method for trial user?
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Nov 11, 2013 12:29 am

can i use this method for trial user?
Yes you can. just create a user profile and make uptime limit for (example) 30 minutes. :D
 
kimdung
just joined
Posts: 3
Joined: Mon Nov 25, 2013 11:05 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Nov 25, 2013 11:35 am

I have a problem about Walled Garden IP List, can you help me?
When add host http://www.facebook.com on Walled Garden IP List, Dst.Address receive the IP is 127.0.0.1. Meanwhile I not to be http://www.facebook.com

Image
 
kimdung
just joined
Posts: 3
Joined: Mon Nov 25, 2013 11:05 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Nov 25, 2013 11:38 am

I have a problem about Walled Garden IP List, can you help me?
When add host http://www.facebook.com on Walled Garden IP List, Dst.Address receive the IP is 127.0.0.1. Meanwhile I not to be http://www.facebook.com

[url=http://upanh.com/view/?id=crc34wbcbwv]Image[/url
 
kimdung
just joined
Posts: 3
Joined: Mon Nov 25, 2013 11:05 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Nov 25, 2013 11:40 am

I have a problem about Walled Garden IP List, can you help me?
When add host http://www.facebook.com on Walled Garden IP List, Dst.Address receive the IP is 127.0.0.1. Meanwhile I not to be http://www.facebook.com

[url=http://upanh.com/view/?id=crc34wbcbwv]Image[/url
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue Dec 03, 2013 12:47 pm

Hey guys, I got some sneak peek from mobile version mikrotik hotspot with facebook login. :)
Image
Image

The script haven't complete yet.. need some more script to get data from facebook and do some api to mikrotik.
hope I can finish it before new year. :)

And some more update, on my php api script, there's something need to be corrected,
$READ = $API->read(false);
$ARRAY = $API->parse_response($READ);
print_r($ARRAY);



on bold part, need to add // on front of each line.
// $READ = $API->read(false);
// $ARRAY = $API->parse_response($READ);
// print_r($ARRAY);
$API->disconnect();

Also for Wallet Garden IP List, fortunately, it was easier to use Wallet Garden than Wallet Garden IP List,
Here some sample Wallet Garden from my router,
# SERVER METHOD DST-HOST DST-PORT PATH ACTION HITS
0 X ;;; place hotspot rules here allow 0
1 *.facebook.com allow 155
2 *.akamaihd.net allow 1
3 *.fbcdn.net allow 33
4 *.facebook.net allow 0
 
tkgit
Frequent Visitor
Frequent Visitor
Posts: 60
Joined: Sun Dec 23, 2012 8:32 am
Location: Dunedin, NZ
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Dec 14, 2013 1:42 am

does the router must have a public IP?
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Dec 14, 2013 1:48 am

does the router must have a public IP?
nope :)
 
tkgit
Frequent Visitor
Frequent Visitor
Posts: 60
Joined: Sun Dec 23, 2012 8:32 am
Location: Dunedin, NZ
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Dec 14, 2013 5:59 am

i think if use publik (external) web server/hosting, it's must have public IP, but if use internal web server (developed server in same local network), it isn't
 
pavloskaras
just joined
Posts: 1
Joined: Tue Dec 17, 2013 12:41 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue Dec 17, 2013 1:00 pm

Hi to all
I am new to this forum. Please help me out with this.
I setup the hotspot service on mikrotik and I customize the login page by adding the facebook script for Like, the users have to like our page in order to get free internet. (This work ok)
The problem is with accounts that already like our site. You have to get data back from facebook.
I had an account in facebook developers site and I specify the ip of mikrotik (we have static public ip) and also the I made the port forwarding but the facebook can’t validate the connection.
I have try my code on a webserver which we have our webpage and it works fine. No certificate error.
How can allow facebook to validate the connection
OR
Can redirect users to my website to hit the like button and back to Mikrotik login page?


thanks in advance
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Apr 19, 2014 7:31 am

Hello,
I'm come back with new method for Login Hotspot mikrotik with Facebook.
Using Facebook PHP-SDK, now support Mobile Device.

Here some screenshoot from my work
Image
On Login Page from Mikrotik
Image
Redirect to web-server to login facebook
Image
Login to Facebook
Image
Dialog Auth App on Facebook
Image
Logged in, need Like (page, web, etc) to open Access to Internet
Image
Like button clicked, Lanjutkan (Continue) button appear.
Image
Login Success. Click GO! to continue browsing
Image
Status Login Mikrotik
Image
on your Facebook Account there will be Post that you using Facebook Mikrotik Hotspot.
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1686
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Apr 19, 2014 8:48 am

LOL!

Share!
 
WiPoint
just joined
Posts: 5
Joined: Fri Nov 16, 2012 6:47 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Apr 19, 2014 5:23 pm

Wow! Please share! :D
 
tkgit
Frequent Visitor
Frequent Visitor
Posts: 60
Joined: Sun Dec 23, 2012 8:32 am
Location: Dunedin, NZ
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue Apr 22, 2014 5:36 am

is it must using public IP hosting ?
 
Jaggl
just joined
Posts: 24
Joined: Mon Aug 27, 2012 3:00 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue Apr 22, 2014 12:11 pm

iam also searching for such a Thing...

iam also willing to pay! so how can we contact you?
 
shnorkiller
just joined
Posts: 19
Joined: Tue Apr 03, 2012 9:54 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed May 14, 2014 6:37 pm

bump!

Am willing to pay for this!
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed May 14, 2014 8:21 pm

Hello,

I see there are some of you interested on my project.
You can get the source code, of course there will be some price on it.
just send me an Email on admin[at]dyasrtrw[dot]net if you want.
:D
Thank you.
 
shnorkiller
just joined
Posts: 19
Joined: Tue Apr 03, 2012 9:54 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Jun 18, 2014 3:54 pm

Hi all,

I bought this code from the developer who promised 2 months support, but after a week of initially being more than willing to assist, he has stopped replying.

This code works, but the process is very long and difficult for the end user to follow. I have had multiple clients tell me they're not interested in using the system, as it includes far too many steps.

Having paid for the code that is not working nicely (and not being able to contact the developer for the last week), i am prepared to share it for free to anyone who can help refine and build it into something that is an easier process for the end user to work with.

If you would like the code, drop me a mail: me (at) jamescoetzee.co.za
 
HaPe
Member Candidate
Member Candidate
Posts: 239
Joined: Fri Feb 10, 2012 10:24 pm
Location: Poland

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Jun 18, 2014 4:44 pm

Hi all,

I bought this code from the developer who promised 2 months support, but after a week of initially being more than willing to assist, he has stopped replying.

This code works, but the process is very long and difficult for the end user to follow. I have had multiple clients tell me they're not interested in using the system, as it includes far too many steps.

Having paid for the code that is not working nicely (and not being able to contact the developer for the last week), i am prepared to share it for free to anyone who can help refine and build it into something that is an easier process for the end user to work with.

If you would like the code, drop me a mail: me (at) jamescoetzee.co.za
Does it need outside server with php support?
 
shnorkiller
just joined
Posts: 19
Joined: Tue Apr 03, 2012 9:54 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Jun 18, 2014 4:48 pm

Yes that is correct
 
pjulian
Member Candidate
Member Candidate
Posts: 267
Joined: Mon May 31, 2004 12:16 pm
Location: Sydney, Australia

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu Jun 19, 2014 1:15 am

Sorry to hear that you have had this problem, I'm sure the person has gained much knowledge from these forums for free but clearly isn't willing to share their knowledge which isn't in the spirit of these or any forums really, the fact that you paid for it and they won't help you is even worse.

What sort of issues are you having ?
The facebook authentication did seem to have a few steps when I looked into it, it may be something you can't avoid, if the user is using a mobile device which is already authenticated I believe it's a lot quicker and simpler.

We are looking more at POS integration now rather than Facebook, Facebook is a dying marketing tool anyway, it's too commercial now and it's so hit and miss with when your posts and stuff actually appear and who actually sees it.

Currently we use a script for a number of customers which does a POST to our systems and creates usernames and passwords on the fly, that way our customers can integrate with their loyalty systems and really anything than can run a script and there is no effort needed on our part.

Regards
Paul
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu Jun 19, 2014 2:22 am

Hi all,
I bought this code from the developer who promised 2 months support, but after a week of initially being more than willing to assist, he has stopped replying.

This code works, but the process is very long and difficult for the end user to follow. I have had multiple clients tell me they're not interested in using the system, as it includes far too many steps.

Having paid for the code that is not working nicely (and not being able to contact the developer for the last week), i am prepared to share it for free to anyone who can help refine and build it into something that is an easier process for the end user to work with.

If you would like the code, drop me a mail: me (at) jamescoetzee.co.za
Hello,
I want to clarifying something in here.
It is true that Mr James (shnorkiller) buying my source code, and last time I try it, still works very well.
On our deal, it was I giving the source code and installation support to be running on his server. But it come as term of source code, I just help in installation of source code. So the buyer free to do changes on source code including make it more easily to be used.
The other people that also buy the code from me doesn't complain about it hard to use / too many step to use.
In problems of I haven't reply Mr James (shnorkiller) message for last few days, I am now on hospital taking care of my Mother that being hospitalized because of her illness.

I began to do coding again last night, and now I making twitter source code. In fact I will give Mr James (shnorkiller) this source code for free if he like to get this. Twitter comes with very simple steps than Facebook, because Twitter API is more simple than Facebook.
:)

What sort of issues are you having ?
The facebook authentication did seem to have a few steps when I looked into it, it may be something you can't avoid, if the user is using a mobile device which is already authenticated I believe it's a lot quicker and simpler.
Paul
Yes I agree with this. Facebook API is very complicated and since 1 May, Facebook has new rule for new application that do "Login with Facebook" feature, they have to do submission for doing this. :(


Please feel free to ask or talk to me on admin[at]dyasrtrw[dot]net :-)
 
shnorkiller
just joined
Posts: 19
Joined: Tue Apr 03, 2012 9:54 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu Jun 19, 2014 9:49 am

Sorry to hear that you have had this problem, I'm sure the person has gained much knowledge from these forums for free but clearly isn't willing to share their knowledge which isn't in the spirit of these or any forums really, the fact that you paid for it and they won't help you is even worse.

What sort of issues are you having ?
The facebook authentication did seem to have a few steps when I looked into it, it may be something you can't avoid, if the user is using a mobile device which is already authenticated I believe it's a lot quicker and simpler.

We are looking more at POS integration now rather than Facebook, Facebook is a dying marketing tool anyway, it's too commercial now and it's so hit and miss with when your posts and stuff actually appear and who actually sees it.

Currently we use a script for a number of customers which does a POST to our systems and creates usernames and passwords on the fly, that way our customers can integrate with their loyalty systems and really anything than can run a script and there is no effort needed on our part.

Regards
Paul
Hi Paul,

I didnt mind paying for the setup, as we're really needing a working integrated facebook solution.

Is it not possible to host an external login.html page on a server that would only show login button if facebook page is liked? That would be an easy solution. Also, can the facebook app not do the liking of the facebook page for the user? So the user cant use the app if they dont like the page? That way it will help cut out extra steps.

The way it currently works: login.html (with login with facebook button)--> click login-->redirected to external fb.php page--> click login with facebook-->allow app permission, allow to post on your wall --> redirect back to go.php where user must "like" the page-->that page then refreshes and displays a "go" button that passes the info back to mikrotik RB and then logs a user in.

This is way too complex, i dont mind if it requires 2 or so pages to go through, but theres no ways someone who is not tech savvy could easily navigate through this process.

I have seen that there are people out there like https://www.fusionwifi.com/ and another spanish company that contacted me yesterday saying that they could do it.

Im a complete beginner to mikrotik and php, so anyone who could just explain further how i could possibly do this easier, i would really appreciate it!
 
Sigma721
Member Candidate
Member Candidate
Posts: 109
Joined: Sat Nov 19, 2011 5:47 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu Jun 26, 2014 2:57 pm

Hi everyone, we have managed to get our Facebook side of things to work perfectly but we cant seem to get the Mikrotik API to post back to the Router Board correctly. Is there anyone who is willing to help? PM me and Il share the code with you.
 
HaPe
Member Candidate
Member Candidate
Posts: 239
Joined: Fri Feb 10, 2012 10:24 pm
Location: Poland

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Jun 28, 2014 9:55 pm

Hi everyone, we have managed to get our Facebook side of things to work perfectly but we cant seem to get the Mikrotik API to post back to the Router Board correctly. Is there anyone who is willing to help? PM me and Il share the code with you.
Could you send me that on dexter063 {at} gmail.com ? PMs aren't working.
 
Atroman
newbie
Posts: 46
Joined: Wed Dec 22, 2010 6:01 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu Aug 14, 2014 12:19 am

Why not register for fusionwifi's reseller platform?
 
Jaggl
just joined
Posts: 24
Joined: Mon Aug 27, 2012 3:00 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Aug 18, 2014 12:11 pm

they are not cheap!
 
flynno
Member
Member
Posts: 319
Joined: Wed Aug 27, 2014 8:11 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Fri Sep 12, 2014 4:02 pm

Ok guys I think I got the login to work for facebook but the page needs styling,
add code to your current login page and it should work.
It also posts to facebook aswel see attached file,


Edit the index.html with Notepad++ or dreamweaver
Look for the below lines and change the appid to yours

=================================================================================================================================

''appId : '000000000000000', // <<< ENTER YOUR APPID HERE REPLACE THE 000000000000000000000''
''js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=00000000000000000&version=v2.0"; // <<< ENTER YOUR APPID HERE REPLACE THE 00000000000000000''

==================================================================================================================================

This line below is the redirection line change to suit your hotspot config, be sure that you created the user2 profile with multible logins on same profile

window.top.location = 'http://192.168.88.1/login?username=user2&password=user2'//redirect-url.com'; REDIRECTS TO ROUTER USING THE ''USER2'' as username AND ''USER2'' as password

==================================================================

FB.api('/me/feed', 'post', {message: 'hey!'}); //CHANGE MESSAGE HERE!

==================================================================

Upload it to webserver and add your host to walled garden along with facebook ips
You do not have the required permissions to view the files attached to this post.
 
flynno
Member
Member
Posts: 319
Joined: Wed Aug 27, 2014 8:11 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Sep 13, 2014 2:56 pm

Preview for wifi login page for Cafe also make one for a bar,

Put a slot for name of cafe/bar up top left corner or something

anyone interested, pm me
You do not have the required permissions to view the files attached to this post.
 
HaPe
Member Candidate
Member Candidate
Posts: 239
Joined: Fri Feb 10, 2012 10:24 pm
Location: Poland

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Sep 13, 2014 4:01 pm

Preview for wifi login page for Cafe also make one for a bar,

Put a slot for name of cafe/bar up top left corner or something

anyone interested, pm me
PM on this board are blocked!!!
 
HaPe
Member Candidate
Member Candidate
Posts: 239
Joined: Fri Feb 10, 2012 10:24 pm
Location: Poland

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Sep 13, 2014 4:03 pm

Ok guys I think I got the login to work for facebook but the page needs styling,
add code to your current login page and it should work.
It also posts to facebook aswel see attached file,


Edit the index.html with Notepad++ or dreamweaver
Look for the below lines and change the appid to yours

=================================================================================================================================

''appId : '000000000000000', // <<< ENTER YOUR APPID HERE REPLACE THE 000000000000000000000''
''js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=00000000000000000&version=v2.0"; // <<< ENTER YOUR APPID HERE REPLACE THE 00000000000000000''

==================================================================================================================================

This line below is the redirection line change to suit your hotspot config, be sure that you created the user2 profile with multible logins on same profile

window.top.location = 'http://192.168.88.1/login?username=user2&password=user2'//redirect-url.com'; REDIRECTS TO ROUTER USING THE ''USER2'' as username AND ''USER2'' as password

==================================================================

FB.api('/me/feed', 'post', {message: 'hey!'}); //CHANGE MESSAGE HERE!

==================================================================

Upload it to webserver and add your host to walled garden along with facebook ips
Everybody can read username and password via CTRL+U and after that prepare login page.
 
flynno
Member
Member
Posts: 319
Joined: Wed Aug 27, 2014 8:11 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Sep 13, 2014 6:45 pm

Ok guys I think I got the login to work for facebook but the page needs styling,
add code to your current login page and it should work.
It also posts to facebook aswel see attached file,


Edit the index.html with Notepad++ or dreamweaver
Look for the below lines and change the appid to yours

=================================================================================================================================

''appId : '000000000000000', // <<< ENTER YOUR APPID HERE REPLACE THE 000000000000000000000''
''js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=00000000000000000&version=v2.0"; // <<< ENTER YOUR APPID HERE REPLACE THE 00000000000000000''

==================================================================================================================================

This line below is the redirection line change to suit your hotspot config, be sure that you created the user2 profile with multible logins on same profile

window.top.location = 'http://192.168.88.1/login?username=user2&password=user2'//redirect-url.com'; REDIRECTS TO ROUTER USING THE ''USER2'' as username AND ''USER2'' as password

==================================================================

FB.api('/me/feed', 'post', {message: 'hey!'}); //CHANGE MESSAGE HERE!

==================================================================

Upload it to webserver and add your host to walled garden along with facebook ips
Everybody can read username and password via CTRL+U and after that prepare login page.

Ya your right, But its easier for a user of the wifi just to enter in their facebook username and password rather than "http://192.168.88.1/login?username=user2&password=user2"
or am I missing something else?
 
prajals
just joined
Posts: 1
Joined: Mon Sep 22, 2014 9:06 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Sep 22, 2014 9:22 am

router_class.api.php . where is dis file.
 
kraker
Frequent Visitor
Frequent Visitor
Posts: 89
Joined: Thu Aug 02, 2012 9:34 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Thu Sep 25, 2014 9:29 pm

Login facebook also others with php...

http://www.9lessons.info/2011/01/facebo ... p-and.html
 
ibermi
just joined
Posts: 22
Joined: Mon Dec 13, 2010 12:26 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Oct 08, 2014 5:42 pm

There is something new?
 
salvatron
just joined
Posts: 7
Joined: Mon Aug 11, 2014 1:32 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Wed Nov 12, 2014 4:59 pm

Anyone know the galled garden to allow?

Always get an error with https://s-static.ak.facebook.com/connec ... hWv6uak.js

I have *.facebook.com* and others facecebook's pages in gallet warden.
 
mohsinnaqvi786
just joined
Posts: 2
Joined: Fri Jan 09, 2015 9:08 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Fri Jan 09, 2015 9:16 am

ahmad210993 i was following your blog but i had some problems and couldn't go through .
1 : the files i created router_class.api.php and user.php where to run them as i m a new php user so its difficult .
2: the file you uploaded i.e router_class.php doesn't load as it say source is not available .
3 : do we need to use the code we get while creating FB app .
 
alf3299
just joined
Posts: 11
Joined: Wed Oct 02, 2013 2:46 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Wed Feb 25, 2015 5:57 pm

Hi,

please check my demo and tell me what u think

its responsive and translated in portuguese, english and french

please like to access the login page

http://cofeeshopdemo.wii4play.com/login-uk/


tks
 
homeoffice
just joined
Posts: 4
Joined: Wed Dec 17, 2014 4:11 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Feb 27, 2015 2:00 am

Hi,

please check my demo and tell me what u think

its responsive and translated in portuguese, english and french

please like to access the login page

http://cofeeshopdemo.wii4play.com/login-uk/


tks
this already running this login for facebook on your page through the mikrotik? or is it just a demo page
 
mohsinnaqvi786
just joined
Posts: 2
Joined: Fri Jan 09, 2015 9:08 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Feb 27, 2015 9:58 am

Hi,

please check my demo and tell me what u think

its responsive and translated in portuguese, english and french

please like to access the login page

http://cofeeshopdemo.wii4play.com/login-uk/


tks
Is it working ?? Can you share the whole procedure ?
 
carlitosxx
just joined
Posts: 1
Joined: Fri Feb 27, 2015 11:54 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Feb 27, 2015 11:56 am

Hi,

please check my demo and tell me what u think

its responsive and translated in portuguese, english and french

please like to access the login page

http://cofeeshopdemo.wii4play.com/login-uk/


tks
can u share source code please!
---
sorry for my bad english
 
homeoffice
just joined
Posts: 4
Joined: Wed Dec 17, 2014 4:11 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Feb 28, 2015 2:46 am

Ok guys I think I got the login to work for facebook but the page needs styling,
add code to your current login page and it should work.
It also posts to facebook aswel see attached file,


Edit the index.html with Notepad++ or dreamweaver
Look for the below lines and change the appid to yours

=================================================================================================================================

''appId : '000000000000000', // <<< ENTER YOUR APPID HERE REPLACE THE 000000000000000000000''
''js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=00000000000000000&version=v2.0"; // <<< ENTER YOUR APPID HERE REPLACE THE 00000000000000000''

==================================================================================================================================

This line below is the redirection line change to suit your hotspot config, be sure that you created the user2 profile with multible logins on same profile

window.top.location = 'http://192.168.88.1/login?username=user2&password=user2'//redirect-url.com'; REDIRECTS TO ROUTER USING THE ''USER2'' as username AND ''USER2'' as password

==================================================================

FB.api('/me/feed', 'post', {message: 'hey!'}); //CHANGE MESSAGE HERE!

==================================================================

Upload it to webserver and add your host to walled garden along with facebook ips
Hello,
I released several sites and before logging into the hotspot login button for facebook does not appear, you know what can be? tks.
 
homeoffice
just joined
Posts: 4
Joined: Wed Dec 17, 2014 4:11 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sat Feb 28, 2015 2:48 am

Anyway here I made some tutorial for what I've done,
here is the link:
http://blog.dyasrtrw.net/2013/04/login- ... ebook.html

It's using Bahasa (Indonesia Language), so if you want to read it in English, use Google translate :)
Or click here to auto translate to English,
Hello ,

I follow your tutorial , but no lucky. I put user.php and routeros class API in web server , login.html inside hotspot directory of MT. I can create a new user inside MT , but no authentications inside MT.

Web server with FQDN , MT with public static IP on different address. FB application with correct parameters. I think that in your tutorial forgot same step.

Can you help me ?

Can you publish here the correct login.html file and user.php ?

Thank's in advance.

p.s. I try a new way with external captive authentication .
Hello.. thanks for giving feedback about my work.
here I give you source code from my work,
http://www.dyasrtrw.net/fb/login-facebo ... e-code.rar

I think you're right, there's one think I forgot to write on my tutorial, that was Hotspot Walled-Garden (to enable user to open facebook page without need to login).
so here somethink you need to do:
1. open IP>Hotspot>Walled Garden IP List
2. add this address and allow it,
#    SERVER     PROTOCOL   DST-HOST                  DST-ADDRESS     DST-PORT   ACTION
 0  hotspot1     tcp             www.facebook.com                              443        accept
 1  hotspot1     tcp             www.facebook.com                              80          accept
 2  hotspot1     tcp             connect.facebook.net                           443        accept
 3  hotspot1     tcp             connect.facebook.net                           80          accept
 4  hotspot1     tcp             *.facebook.com                                   443        accept
 5  hotspot1     tcp             *.facebook.com                                   80         accept
 6  hotspot1     tcp             *.akamaihd.net                                   443        accept
 7  hotspot1     tcp             *.akamaihd.net                                   80         accept
And you're done. :)
the link does not exist anymore, could provide another link again? tks.
 
lordsok
just joined
Posts: 19
Joined: Mon Mar 02, 2015 12:41 pm

Re: Integrating Facebook Connect with Hotspot Login / Authen

Mon Mar 02, 2015 12:44 pm


Hello.. thanks for giving feedback about my work.
here I give you source code from my work,
http://www.dyasrtrw.net/fb/login-facebo ... e-code.rar

I think you're right, there's one think I forgot to write on my tutorial, that was Hotspot Walled-Garden (to enable user to open facebook page without need to login).
so here somethink you need to do:
1. open IP>Hotspot>Walled Garden IP List
2. add this address and allow it,
#    SERVER     PROTOCOL   DST-HOST                  DST-ADDRESS     DST-PORT   ACTION
 0  hotspot1     tcp             www.facebook.com                              443        accept
 1  hotspot1     tcp             www.facebook.com                              80          accept
 2  hotspot1     tcp             connect.facebook.net                           443        accept
 3  hotspot1     tcp             connect.facebook.net                           80          accept
 4  hotspot1     tcp             *.facebook.com                                   443        accept
 5  hotspot1     tcp             *.facebook.com                                   80         accept
 6  hotspot1     tcp             *.akamaihd.net                                   443        accept
 7  hotspot1     tcp             *.akamaihd.net                                   80         accept
And you're done. :)
the link does not exist anymore, could provide another link again? tks.[/quote]


Link is expired.. Please share again. Thanks
 
psekinho
just joined
Posts: 3
Joined: Wed Apr 22, 2015 9:18 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Wed Apr 22, 2015 9:22 pm

Has anyone managed to finally make "login with facebook like" work?
Is there a place where i can find instructions or code?
Thank you in advance.
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Jul 23, 2015 3:30 am

Has anyone managed to finally make "login with facebook like" work?
Is there a place where i can find instructions or code?
Thank you in advance.
Hello, for as I know, since November 2014, Facebook ban all using of Liked-Gating (user need to liked some page to get access / to open access to content). You can read it in here,
https://developers.facebook.com/blog/po ... -API-v2.1/
https://developers.facebook.com/docs/fa ... sions/v2.4 (on user_likes section)
so the answer is NO. there won't be any login with facebook like anymore :(
only can get user public profile data to use as login with facebook.
 
ahmad210993
just joined
Posts: 16
Joined: Sun Mar 10, 2013 3:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Jul 23, 2015 3:46 am

Hello,
Here is the latest demo I made.
this is still basic code and template.
http://cclunisbank.triputramedia.id/login

some Screenshoot :
login1.png
login3.png
login2.png
You do not have the required permissions to view the files attached to this post.
 
Simheng
just joined
Posts: 1
Joined: Wed Jul 01, 2015 12:19 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon Oct 19, 2015 3:25 pm

Dear Mr.

I would like to ask you about,
How to link to website after login with hotspot?

Thank you.
 
braind
just joined
Posts: 3
Joined: Thu Nov 12, 2015 11:10 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Nov 12, 2015 11:49 pm

Hello,
Here is the latest demo I made.
this is still basic code and template.
http://cclunisbank.triputramedia.id/login

some Screenshoot :
login1.png
login3.png
login2.png

Hello.
Does it works with mikrotik router? Could you please tell more about your solution?
 
braind
just joined
Posts: 3
Joined: Thu Nov 12, 2015 11:10 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Sat Nov 14, 2015 10:19 pm

If somebody is interested, managed the facebook login with php sdk facebook and MAC address storage in php session, showing the connect button after the facebook authentication. Still got some issues, but works.
 
danielferreira
just joined
Posts: 2
Joined: Thu Nov 19, 2015 11:35 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Nov 20, 2015 5:41 pm

If somebody is interested, managed the facebook login with php sdk facebook and MAC address storage in php session, showing the connect button after the facebook authentication. Still got some issues, but works.

can you send or post the code?
 
danielferreira
just joined
Posts: 2
Joined: Thu Nov 19, 2015 11:35 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Nov 20, 2015 5:41 pm

If somebody is interested, managed the facebook login with php sdk facebook and MAC address storage in php session, showing the connect button after the facebook authentication. Still got some issues, but works.

can you send or post the code?
 
darwinmedina
just joined
Posts: 1
Joined: Fri Sep 25, 2015 6:54 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon Nov 30, 2015 5:58 pm

if somebody is interesting in a social media login (Facebook, Google) with Mikrotik, i have a working solution, send me an email to darwin.medina@creadoresti.com
 
pas
just joined
Posts: 17
Joined: Mon Nov 30, 2015 9:21 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Tue Dec 01, 2015 9:59 am

I have an advanced social login for Mikrotik with user data collection and automatic CHECK-IN in a place.
You can see the social example at page 3 of this pdf http://troccolielectric.com/network-services.pdf
 
christiam
just joined
Posts: 3
Joined: Tue Sep 15, 2015 4:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Wed Dec 02, 2015 4:32 pm

I have an advanced social login for Mikrotik with user data collection and automatic CHECK-IN in a place.
You can see the social example at page 3 of this pdf http://troccolielectric.com/network-services.pdf
Hi, please send me this PDF, I could not download it from the link.
Thanks.
CRey
 
pas
just joined
Posts: 17
Joined: Mon Nov 30, 2015 9:21 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Dec 03, 2015 9:37 am

Hi, please send me this PDF, I could not download it from the link.
Thanks.
CRey
Please gave me an email or try this http://troccolielectric.com/network-services.zip
 
christiam
just joined
Posts: 3
Joined: Tue Sep 15, 2015 4:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon Dec 07, 2015 4:48 am

Hi, please send me this PDF, I could not download it from the link.
Thanks.
CRey
Please gave me an email or try this http://troccolielectric.com/network-services.zip
Please send me PDF "network-services.zip" thanks a lot.
tungasuca@gmail.com
 
christiam
just joined
Posts: 3
Joined: Tue Sep 15, 2015 4:43 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon Dec 07, 2015 4:52 am

Hi, please send me this PDF, I could not download it from the link.
Thanks.
CRey
Please gave me an email or try this http://troccolielectric.com/network-services.zip
Hi
download PDF file
message damaged file o size incorrect
 
pas
just joined
Posts: 17
Joined: Mon Nov 30, 2015 9:21 pm

Mon Dec 07, 2015 9:05 am

Hello, the PDF and the ZIP are ok, try to open it with Adobe Reader.
 
User avatar
lectrapon
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Tue Mar 03, 2015 2:10 pm

Re:

Thu Dec 10, 2015 7:41 pm

Hello, the PDF and the ZIP are ok, try to open it with Adobe Reader.
Hello pas,

I receive "error 404" message with the link " http://troccolielectric.com/network-services.zip ".

I want to integrate facebook connect with my Hotspot Login. Can you post another links ?
 
pas
just joined
Posts: 17
Joined: Mon Nov 30, 2015 9:21 pm

Re: Re:

Thu Dec 10, 2015 7:56 pm

Hello, the PDF and the ZIP are ok, try to open it with Adobe Reader.
Hello pas,

I receive "error 404" message with the link " http://troccolielectric.com/network-services.zip ".

I want to integrate facebook connect with my Hotspot Login. Can you post another links ?
Now it's working. Yesterday I corrected a typo on pdf and I forgot to upload the zip.
 
leosedf
just joined
Posts: 16
Joined: Sun Nov 08, 2009 1:34 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Tue Dec 15, 2015 2:57 pm

Hello!
Do we have a solution using facebook like to login?

Are they free or paid options? I'm interested and wanted to have more info.

Thank's :)
 
ibm
Member
Member
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Tue Dec 15, 2015 3:12 pm

EDIT
Last edited by ibm on Tue Dec 15, 2015 3:51 pm, edited 1 time in total.
 
User avatar
lectrapon
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Tue Mar 03, 2015 2:10 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Tue Dec 15, 2015 3:48 pm

Hello!
Do we have a solution using facebook like to login?

Are they free or paid options? I'm interested and wanted to have more info.

Thank's :)
We can provide that solution but we don't reccomend it, because the second time that the client login there is already the like.
I think that the useful is relative... For second login we will try other conditions as locate place to indicate your Wi-Fi position to friends list.[emoji6]

Envoyé de mon GT-I9190 en utilisant Tapatalk
 
leosedf
just joined
Posts: 16
Joined: Sun Nov 08, 2009 1:34 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Tue Dec 15, 2015 6:29 pm

Maybe time expiration?
Is there anything i can try on?
 
User avatar
lectrapon
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Tue Mar 03, 2015 2:10 pm

Tue Dec 15, 2015 6:42 pm

Unfortunately nobody has found something concrete to share here... :(
I am searching on Goo

Envoyé de mon GT-I9190 en utilisant Tapatalk
 
lucasaf
just joined
Posts: 2
Joined: Tue Jan 19, 2016 6:37 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Tue Jan 19, 2016 6:40 pm

Mikrotik should work on some thing....
Today i was checking some links and there is a few brands that already have hotspot integrate with facebook (https://www.facebook.com/help/109150235937957).
 
Merken
just joined
Posts: 4
Joined: Fri Feb 26, 2016 5:40 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Feb 26, 2016 5:52 pm

Hi all ! My company does just that. We are open minded to white labels and have various marketing features!

Have a great week-end 8)



Mikrotik should work on some thing....
Today i was checking some links and there is a few brands that already have hotspot integrate with facebook (https://www.facebook.com/help/109150235937957).
 
Merken
just joined
Posts: 4
Joined: Fri Feb 26, 2016 5:40 pm

Re: Mikrotik Facebook Login business in a box !

Fri Feb 26, 2016 5:53 pm

Hope I'am not too late @lectrapon!
Feel free to connect if you need help!
Unfortunately nobody has found something concrete to share here... :(
I am searching on Goo

Envoyé de mon GT-I9190 en utilisant Tapatalk
 
Merken
just joined
Posts: 4
Joined: Fri Feb 26, 2016 5:40 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Feb 26, 2016 5:58 pm

I'd be more than happy to present you my solution !
Great business indeed !
Hello!
Do we have a solution using facebook like to login?

Are they free or paid options? I'm interested and wanted to have more info.

Thank's :)
We can provide that solution but we don't reccomend it, because the second time that the client login there is already the like.
I think that the useful is relative... For second login we will try other conditions as locate place to indicate your Wi-Fi position to friends list.[emoji6]

Envoyé de mon GT-I9190 en utilisant Tapatalk
 
ibm
Member
Member
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Feb 26, 2016 8:20 pm

I'd be more than happy to present you my solution !
Great business indeed !
We're completing our latest suite that includes a new and responsive web interface to collect a lot of data, let the client make advertising and obviously to manage the social authentication.
Next week I will post a preview.
 
Merken
just joined
Posts: 4
Joined: Fri Feb 26, 2016 5:40 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Sat Feb 27, 2016 9:27 pm

I'd be more than happy to share ideas and compare our solutions !
We got features such as automated opt-in email, birthday campaigns, web intra net where the customer changes visuals, punchlines to be shares and a great analytic section.



I'd be more than happy to present you my solution !
Great business indeed !
We're completing our latest suite that includes a new and responsive web interface to collect a lot of data, let the client make advertising and obviously to manage the social authentication.
Next week I will post a preview.
 
pas
just joined
Posts: 17
Joined: Mon Nov 30, 2015 9:21 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Wed Mar 23, 2016 5:14 pm

Dear colleagues
since in many RouterOS forum I see a lot of requests for social authentication etc. I would like to show our newly released suite that allow an enhanced management of the hotspot based on Mikrotik and enable the social authentication.

It's a software suite, customizable in all its parts, mainly directed to Italian and European companies with the following features:
- Authentication management
- Advanced statistics
- Users details
- Profiles management
- Advertising
- Massive communications through email and SMS
- Responsive and customized Captive portal
- Captive portal menu integration with concierge services (ideal for hotel)

Avaiable authentication:
- Facebook (with place or link publishing)
- Google
- SMS
- Voucher
- Username and password
- Password

With all the authentication type is avaiable the user data collecting i.e. email, phone number, city etc.
High res flyer image: http://troccolielectric.com/lucy.jpg
For more info you can write at the following email: info[at]troccolielectric.com

Image
 
leosedf
just joined
Posts: 16
Joined: Sun Nov 08, 2009 1:34 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon Apr 11, 2016 7:38 pm

Can anyone point us to a simple like solution? Most of the services are paid monthly and offer too many services which i do not need.
Is there a one time payment solution anywhere?
 
Yako
just joined
Posts: 1
Joined: Tue Apr 12, 2016 3:50 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Tue Apr 12, 2016 4:46 pm

is posible someone upload a link whit this old file

http://www.dyasrtrw.net/fb/login-facebo ... e-code.rar

which no longer works please?

thank you very much

Yako
 
diablonet
Frequent Visitor
Frequent Visitor
Posts: 67
Joined: Wed Jan 05, 2011 3:33 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu May 26, 2016 5:52 pm

https://www.dropbox.com/s/k0zvex068e964 ... e.rar?dl=0

Here is the login-facebook-source-code.rar
 
User avatar
berry2012
newbie
Posts: 36
Joined: Thu Apr 25, 2013 4:07 pm
Location: Nigeria
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authen

Sun Jun 05, 2016 2:07 pm

Anyway here I made some tutorial for what I've done,
here is the link:
http://www.ragilakimoto.com/2013/04/log ... ebook.html

It's using Bahasa (Indonesia Language), so if you want to read it in English, use Google translate :)
Or click here to auto translate to English,

Hi,

I followed the link you shared but the page is no longer available.
Please can you reshare?
I want to implement this on my hotspot network.

Thanks
waleberry@yahoo.com
 
diablonet
Frequent Visitor
Frequent Visitor
Posts: 67
Joined: Wed Jan 05, 2011 3:33 am

Re: Integrating Facebook Connect with Hotspot Login / Authen

Tue Jun 07, 2016 4:42 pm

Anyway here I made some tutorial for what I've done,
here is the link:
http://www.ragilakimoto.com/2013/04/log ... ebook.html

It's using Bahasa (Indonesia Language), so if you want to read it in English, use Google translate :)
Or click here to auto translate to English,

Hi,

I followed the link you shared but the page is no longer available.
Please can you reshare?
I want to implement this on my hotspot network.

Thanks
waleberry@yahoo.com

https://www.dropbox.com/s/k0zvex068e964 ... e.rar?dl=0
here is the file
 
pas
just joined
Posts: 17
Joined: Mon Nov 30, 2015 9:21 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Jun 30, 2016 4:34 pm

New release of Lucy Suite for Mikrotik Hotspot
http://odytel.it/lucy.html

Image

Image

Image

Image

Image
 
andreasw
just joined
Posts: 1
Joined: Thu Nov 03, 2016 2:34 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Nov 03, 2016 2:41 pm

New release of Lucy Suite for Mikrotik Hotspot
http://odytel.it/lucy.html
Hi Pas,

is there any german reseller or some contact in germany?
Is there any online demo for lucy?

Best regards,
andreas
 
rokib22
just joined
Posts: 1
Joined: Wed Apr 12, 2017 11:40 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon Apr 24, 2017 10:54 am

https://www.dropbox.com/s/k0zvex068e964 ... e.rar?dl=0

Here is the login-facebook-source-code.rar
this source code work on virtual box? because i want try to my project
 
afunnell
just joined
Posts: 2
Joined: Mon May 08, 2017 10:02 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon May 08, 2017 10:09 pm

Hi all

Please can someone tell me if they have got this working properly with Mikrotik routers?

I have been trying to get Facebook WiFi logon working with a Mesh router, although I also have a Mikrotik router which I haven't yet tried.

I have tried 2 different systems; cloudtrax.com and mywifi.io but I have come across the same problem on both.

The problem is that when I connect to the WiFi hotspot on a mobile phone the Facebook logon page is launched in the mobile phone's browser instead of in the Facebook app. Most people, myself included, don't have my Facebook credentials stored in my mobile phone's browser so people simply click on the "Skip logon" link which defeats the object of the system.

The support teams from both systems have told me that this logon process is controlled by Facebook and that they cannot modify it.

Please can you tell me if your system also exhibits the same behavour or can it be setup to launch the phone's Facebook app?

Thanks again
 
reinerotto
Long time Member
Long time Member
Posts: 523
Joined: Thu Dec 04, 2008 2:35 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu May 11, 2017 4:37 pm

>the Facebook logon page is launched in the mobile phone's browser instead of in the Facebook app. Most people, myself included, don't have my Facebook credentials stored in my mobile phone's browser so people simply click on the "Skip logon" link which defeats the object of the system.<
You have to differentiate between the functionality of the fb-logon and the captive portal.
The captive portal detection of the device triggers a mini-browser (depends upon OS; iOS is diffrent to Android to Windows) or sets only a small popup. This mini-browser, on IOS for example, starts the logon procedure. Which _might_ be the fb-logon, running as PHP-scripts on a backend server via redirection. So the fb-app is never started. However, after one login via browser, the process is almost automatic, as the fb-credentials are stored in browser.
Having done several custom firmwares implementing this (also on OM2P, but mostly on openwrt/LEDE hotspots), I never encountered a "Skip Logon". User is forced to logon via fb, period. But: May be, you mean the 'Skip Logon' during fb-like processing. This is a _MUST_, unless your service is explicitly given permission by facebook to do this 'like gating'. Which is very unlikely. Check fbs terms of use. (Almost) no chance any more to force a Like.
 
User avatar
otgooneo
Trainer
Trainer
Posts: 587
Joined: Tue Dec 01, 2009 3:24 am
Location: Mongolia
Contact:

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Wed Aug 02, 2017 3:18 pm

Good job!
 
camilocastilla
just joined
Posts: 2
Joined: Wed Jan 17, 2018 10:05 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon Feb 12, 2018 8:46 am

Hello everyone.

I revive this entry because I am in a similar project and everything is going well. To the point that from the pc I can login with facebook, that is, open the window to enter username and password, without emargo if what is done from a cell phone with android is blank screen and if I do it from iphone it informs that the connection is not safe.

I appreciate help for several days and I am a little frustrated.

PS: please forgive my English
 
mkfb
just joined
Posts: 4
Joined: Thu Mar 29, 2018 7:54 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Thu Mar 29, 2018 8:15 am

is there any solution for this yet?

tks
 
gnalbandian
just joined
Posts: 9
Joined: Fri Jul 04, 2014 9:09 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Sat Apr 07, 2018 12:34 am

I am also interesyted in native solution for this
 
tangabudhan
just joined
Posts: 2
Joined: Fri Apr 20, 2018 6:54 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Apr 20, 2018 6:57 am

I am preparing to travel to China. How to access facebook?
use VPN or Hotspot?
 
tangabudhan
just joined
Posts: 2
Joined: Fri Apr 20, 2018 6:54 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Fri Apr 20, 2018 6:58 am

I am preparing to travel to China. How to access facebook?
Use VPN or Hotspot?
 
ZschimmerIT
newbie
Posts: 30
Joined: Thu Jul 13, 2017 2:50 pm
Location: Germany

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Tue Oct 30, 2018 1:16 pm

Any Update on the FB connect integration?
 
pikki19
just joined
Posts: 1
Joined: Mon May 27, 2019 12:17 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon May 27, 2019 1:10 pm

Hello,

please, suggest me something about Facebook integration, and also I want to increase Facebook followers and friend request and also increase post likes.
Thank you in advance..
 
MGTECH
just joined
Posts: 1
Joined: Tue Sep 28, 2021 3:50 am

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Sun Oct 03, 2021 4:12 am

I have a template that I can share, please modify it with your Facebook dev app ID.

I have a template that I can share, please modify it with your Facebook dev app ID.

Download it from this link: https://drive.google.com/file/d/1I_2wk_ ... rXtir/view

Then in your mikrotik add a new rule inside: "Walled garden IP list"

In action: accept

In "Dst Host", type: connect.facebook.com

Same procedure for domain: facebook.com

Do not forget to activate the test user in Hotspot.
 
kurlandaniel
just joined
Posts: 4
Joined: Fri Aug 01, 2014 9:41 pm

Re: Integrating Facebook Connect with Hotspot Login / Authent ..

Mon Aug 22, 2022 9:12 pm

Can you make the public download available?

Who is online

Users browsing this forum: kristovskis and 22 guests