Code Monkey home page Code Monkey logo

fbwlan's Introduction

FB WLAN Hotspot

A simple, easy social wlan hotspot. This script works as an auth server for Wifidog. If a user checks in to your business' location on Facebook, they get free wifi in exchange.

Features

Why another auth server?

Quite simply because there are no other working solutions. Some scripts which claim to use Facebook for hotspot authentication are available in the wild. For Authpuppy, there is a third-party plugin for Facebook authentication. Authpuppy itself is quite unmaintained and uses the outdated Symfony 1.x framework. Additionally, there is no check-in functionality out of the box.

There's also the Wifidog auth server which requires PostgreSQL. I don't have a web host capable of PostgreSQL, so that was not acceptable either. The Wifidog auth server also does not support Facebook.

There are more attempts at integrating Facebook login into a open-source hotspot. Kikiauth is promising, yet abandoned by its author. The problem here is themultitude of IP addresses used by Facebook which makes it hard to whitelist all ressources necessary. I solve this problem with the ipset feature of Dnsmasq based on a recommendation by jow on the OpenWRT forums.

The socialwifi project by mengning requires tomcat and other java stuff.

social-hotspot comes quite close to my requirements. It connects to Facebook and either asks the user to like a page or to check in. On the gateway, NoCatSplash captures the user. The problem here is that the Facebook app provides no real security: the user can always log in by POST-ing the correct form to NoCatSplash. Although this is unlikely to pose a real problem as there are unlikely to be any security implications, I didn't like this way of handling authentication client-side.

In my implementation, the gateway (Wifidog) verifies that the Facebook app (this script) actually granted access to the user.

Several commercial implementations are also available. Facebook themselves offer Facebook Wifi. The offer looks good on paper, with affordable devices like the D-Link DIR-865L and the Netgear R6300 (v2). Some research reveals that the Facebook Wifi implementation always enables HTTPS. This means that many smartphone apps will always work and the user might not even notice there is captive portal.

Other vendors charge unreasonable monthly fees for their services.

Limitations

Social hotspots typically rely on an AAA (Authentication, Authorization and Accounting) server. Quite simply, there is no Accounting. Although Wifidog will occasionally update this script with bandwidth usage information, the data is simply discarded.

There is also no real Authentication: the script does not remember who used the hotspot. Facebook is only used to post a message and no details such as user names or emails are retained.

Regarding Authorization: an user is authorized to access the internet once they successfully check in via Facebook or if they provide the access code.

In some jurisdictions, you must keep track of who uses your network. In this case, this script is probably not for you. (Pull requests welcome!)

Requirements

For this script:

  • Webhost with some space
  • PHP 5.4 (or maybe 5.3)
  • 1 MySQL database
  • lftp client

For the gateway:

Install

Copy the example config file to config.php and edit to suit your needs.

cp config-example.php config.php
vim config.php

The entries should be self-explanatory. To use this app, you need to create an app in Facebook. During the app creation process, select "Website" as platform and select "create app id". Proceed to enter the domain where this script will be hosted as app domain. Copy the app id and the app secret to config.php. For testing, this is good enough. Once you have verified that everything works, you need to submit your app for review. Facebook recently introduced this review process for apps which post on behalf of the user.

If you have lftp installed, you can use the upload script. Create a file with login details:

cat <<EOF > upload_creds.sh 
USER="my-ftp-user"
PASS="my-ftp-pass"
SITE="sftp://my-ftp-host/dir/"
EOF

Run the upload script:

bash upload.sh

If you do not have lftp, simply upload the files manually with your FTP client of choice. See upload.lftp for details. In particular, make sure to rename htaccess to .htaccess.

Once you have the files uploaded, you can test the script by opening the website in your browser. If you want to test the Facebook integration, provide some fake gateway details like this:

http://example.xyz/login?gw_id=foo&gw_address=localhost&gw_port=8080

Once you went through the login, you will be redirected to http://localhost:8080/. Don't be scared by the error message (you probably have no server running there!), it means everything is working.

If you get a HTTP 500 error, a possible reason is related to .htaccess. For my Apache 2.4 server, I had to adjust some RewriteRules. If these don't work for you, refer to the original .htaccess for Flight. If that doesn't work, consult the error logs of your webserver.

Configuring Wifidog

Wifidog lives on the gateway/router and intercepts requests made by clients.

The following instructions assume you have already configured the network on your gateway. Typically, you have a wlan interface running without encryption called "MyPlace Guest". Isolating clients from each other is probably a good idea. See the OpenWRT wiki for details.

The script is a drop-in replacement for the Wifidog auth server. Make sure to set up GatewayInterface and ExternalInterface in /etc/wifidog.conf. The AuthServer directive is set up as follows if the script is installed on http://example.xyz/fbwlan/:

AuthServer {
    Hostname example.xyz
    Path /fbwlan/
}

Make sure to set the correct hostname and path!

Allowing Access to Facebook

As described above, Facebook uses many different IP addresses. Due to the way the content distribution networks work, the same host name may resolve to different addresses. This is why it's impractical to just whitelist individual IP addresses. However, http://ipset.netfilter.org/ together with dnsmasq solve this problem nicely.

On OpenWRT 14.07 (Barrier Breaker), the default dnsmasq version does not support ipset. Install dnsmasq-full instead

opkg update
opkg install dnsmasq-full

On boot, we need to create the ipset where we store the IP addresses. This must happen before dnsmasq can populate them. A simple way to handle this is to edit /etc/firewall.user and add the following line to the end:

ipset create fb hash:ip

Then, edit /etc/dnsmasq.conf and tell dnsmasq to store any IPs for Facebook in the fb ipset. Add this to end of the file:

ipset=/facebook.com/fbcdn.net/akamaihd.net/fb

Finally, allow the fb ipset in the firewall. Add this under the FirewallRuleSet unknown-users section in /etc/wifidog.conf

FirewallRule allow to-ipset fb

Testing the setup

Start wifidog and reload the firewall:

fw3 reload
/etc/init.d/dnsmasq restart
/etc/init.d/wifidog start
sleep 10
/etc/init.d/wifidog-fw-extra

Open any non-HTTPS website in your browser and you should be redirected to the captive portal.

Starting Wifidog automatically & reliably

In my testing on Barrier Breaker, the default wifidog init script failed to bring up Wifidog. Apparently, Wifidog starts before the interfaces are up and quits. However, we can (re-)start wifidog automatically on Wifi changes. I took the opportunity to rewrite the Wifidog init script to use the new procd init system. The distinct advantage here is the process supervision: if Wifidog crashes, it is automatically restarted. I originally hoped to reload Wifidog automatically on interface changes via the netdev param, but that didn't work.

cat <<EOF > /etc/init.d/wifidog
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=65

USE_PROCD=1

EXTRA_COMMANDS="status"
EXTRA_HELP="        status Print the status of the service"

start_service() {
    procd_open_instance
    # -s: log to syslog
    # -f: run in foreground
    procd_set_param command /usr/bin/wifidog -s -f
    procd_set_param respawn # respawn automatically if something died
    procd_set_param file /etc/wifidog.conf
    procd_close_instance
    # wait for firewall rules to be setup
    /etc/init.d/wifidog-fw-extra enabled && /etc/init.d/wifidog-fw-extra restart &

}
# TODO: wdctl supports reload without disconnecting users
EOF
chmod +x /etc/init.d/wifidog

Note that the script backgrounds the call to wifidog-fw-extra. Otherwise, the firewall will be set up before Wifidog which will then promptly discard the rules.

To ensure that Wifidog is restarted on interface changes, we create the following hotplug script:

cat <<EOF >/etc/hotplug.d/iface/30-wifidog
#!/bin/sh
# Based on firewall.hotplug
[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0

/etc/init.d/wifidog enabled || exit 0
logger -t wifidog "Reloading wifidog due to $ACTION of $INTERFACE ($DEVICE)"
/etc/init.d/wifidog restart
EOF
chmod +x /etc/hotplug.d/iface/30-wifidog

Note that you can see the logger output with the logread command.

Now enable the init scripts to make Wifidog start on boot:

/etc/init.d/wifidog enable
/etc/init.d/wifidog-fw-extra enable

The downside to this method is that Wifidog is restarted multiple times. In addition, the firewall is called repeatedly and slows down the boot process due to the sleep 10 call. The upside is that it works.

License

FBWLAN is licensed under the AGPL. The files in views/* bear no copyright notice for practical reasons, but they carry the same license.

fbwlan's People

Contributors

cquijano avatar mhaas avatar teldosas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fbwlan's Issues

PHP 5.3 error

I get some error in PHP 5.3
line //$postid = $response->asArray()['id'];
fb_handlers.php
FB SDK need PHP 5.4 too ...

How about Multigateway support ?

I have question about if we have multigateway, with check-in facebook for each location so we must create many authserver and facebook app ?
I think if we can config for each gateway have setting to change page id to check-in
config for each gate apear in maps
That so good :D i see wifidog authserver and authpuppy have that config ?

Facebook DNS not Resolved on OpenWRT Chaos Calmer

Did you test the project on a box with OpenWRT 15.05 (Chaos Calmer)??

authsrv<-->internet<-->openwrtbox<-->apwifi<-->devicewifi

Steeps:

  1. burn firmware OpenWRT 15.05 on Linksys E900
  2. opkg install ipset
  3. opkg install dnsmasq-full
  4. opkg install wifidog
  5. config wifidog authsrv (Amazon AWS VM)
  6. finish running your scripts which appends init and hotplug files
    everything works! wifi connect, redirect to AuthSrv, static CODE (gives internet connection), but when I try to connect with facebook check-out facebook dns are not resolved!

what would you do? try installing openwrt 14.07?

Can't start wifidog, lost internet access on the ap

Ok, im doing everything according to the guide, but when i try to test it i get this:

root@OpenWrt:# fw3 reload
-ash: fw3: not found
root@OpenWrt:# /etc/init.d/dnsmasq restart
dnsmasq: bad option at line 39 of /etc/dnsmasq.conf (Copied the line from the guide)

root@OpenWrt:# /etc/init.d/wifidog start
Starting Wifidog ...
Testing for iptables modules
Testing ipt_mac
ipt_mac module is working
Testing ipt_mark
ipt_mark module is working
Testing ipt_REDIRECT
ipt_REDIRECT module is working
[3][Thu Feb 16 03:30:29 2017]19937 Invalid mask -ipset
OK
root@OpenWrt:# [3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -F WiFiDog_br-lan_Trusted
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -F WiFiDog_br-lan_Outgoing
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -F WiFiDog_br-lan_Incoming
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -X WiFiDog_br-lan_Trusted
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -X WiFiDog_br-lan_Outgoing
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -X WiFiDog_br-lan_Incoming
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_AuthServers
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_Outgoing
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_WIFI2Router
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_WIFI2Internet
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_Global
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_Unknown
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_AuthServers
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_Outgoing
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_WIFI2Router
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_WIFI2Internet
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_Global
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_Unknown
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_WIFI2Internet
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_AuthServers
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Locked
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Global
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Validate
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Known
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Unknown
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_WIFI2Internet
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_AuthServers
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Locked
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Global
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Validate
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Known
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Unknown
[4][Thu Feb 16 03:30:32 2017]19938 Auth server did NOT say pong!

root@OpenWrt:~# /etc/init.d/wifidog-fw-extra
-ash: /etc/init.d/wifidog-fw-extra: not found

I'm using a WR741ND V4 with OpenWrt Attitude Adjustment 12.09-rc1
Tried to install dnsmasq but failed:

root@OpenWrt:~# opkg install dnsmasq-full
Unknown package 'dnsmasq-full'.
Collected errors:<

  • opkg_install_cmd: Cannot install package dnsmasq-full.

Installed ipset separatedly:

root@OpenWrt:~# opkg install ipset
Package ipset (6.11-2) installed in root is up to date.

Added the ipset to firewall.user, and even executing the command "ipset create fb hash:ip" gives no error.
What am I doing wrong? Oh, i added a space in "FirewallRule allow to-ipset fb" to "FirewallRule allow to -ipset fb" or else i got "Invalid or unexpected keyword to-ipset, expecting "to""
Removing the "-" just changes the error from "Invalid mask -ipset" to "Invalid mask ipset"
Any help would be greatly appreciated.
Thanks in advance.

Device Support

I was implementing Social Hotspot with RouterOS and a simple Garden, I had problems with facebook ips, MikroTik have great and cheap Routers, RouterOS is great, but OpenWRT have an stronger community. I was trying to implement your script, I have TP-Link/Cisco with DD-WRT/OpenWRT but in both I had space problem (4MB ROM).
Does it still works? Which devices did you test it?
I'll try it on a MikroTik with 64MB. It might be interesting, that community posts compatible devices, and requeriments like OpenWRT with minimum 8MB.
I wanna test it and make a nice template with bootstrap (Do you have screenshots?)
Great Work!

No valid answer from the central server

After setting up fbwlan on my server (shared hosting) and installing and configuring Wifidog, the captive portal worked and my requests were intercepted. I get redirected to the fbwlan page, I enter the access code and press to connect. Then I am redirect back to http://192.168.1.1:2060/wifidog/auth?token=a352c1d3d98f33e0ab7a0209540279d8bb6c5ad0 and the following message appears.
Error: We did not get a valid answer from the central server

I then started Wifidog with wifidog -f -d 7 to get all the debugging. I found the following things that are of interest, but I am unsure where the problem lies. Could you help with this? I am interested in the techniques as well and would like to add some functionality later as well.

Maybe useful to know, the webserver uses https and I tried both wifidog configurations with sslavailable true and false.

[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:312) Level 1: Connecting to auth server wifi.schutterstoernooi.nl:80
[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:341) Level 1: Successfully connected to auth server wifi.schutterstoernooi.nl:80
[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:158) Unlocking config
[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:158) Config unlocked
[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:164) Connected to auth server
[6][Wed Jun 21 12:48:54 2017][5284](wd_util.c:116) AUTH_ONLINE status became ON
[7][Wed Jun 21 12:48:54 2017][5284](simple_http.c:77) Sending HTTP request to auth server: [GET /ping/?gw_id=default&sys_uptime=2353&sys_memfree=33488&sys_load=0.01&wifidog_uptime=1 HTTP/1.0
User-Agent: WiFiDog 1.3.0
Host: wifi.schutterstoernooi.nl

]

[7][Wed Jun 21 12:48:54 2017][5284](simple_http.c:87) Reading response
[7][Wed Jun 21 12:48:54 2017][5284](simple_http.c:111) Read 719 bytes
[7][Wed Jun 21 12:48:54 2017][5284](simple_http.c:124) HTTP Response from Server: [HTTP/1.1 301 Moved Permanently
Date: Wed, 21 Jun 2017 12:48:54 GMT
Server: Apache
Location: https://wifi.schutterstoernooi.nl/ping/?gw_id=default&sys_uptime=2353&sys_memfree=33488&sys_load=0.01&wifidog_uptime=1
Content-Length: 417
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://wifi.schutterstoernooi.nl/ping/?gw_id=default&amp;sys_uptime=2353&amp;sys_memfree=33488&amp;sys_load=0.01&amp;wifidog_uptime=1">here</a>.</p>
<hr>
<address>Apache Server at wifi.schutterstoernooi.nl Port 80</address>
</body></html>
]
[4][Wed Jun 21 12:48:54 2017][5284](ping_thread.c:191) Auth server did NOT say Pong!
[7][Wed Jun 21 12:48:54 2017][5284](firewall.c:139) Marking auth server down
[7][Wed Jun 21 12:50:54 2017][5284](simple_http.c:77) Sending HTTP request to auth server: [GET /auth/?stage=counters&ip=192.168.1.150&mac=54:ee:75:34:91:02&token=a352c1d3d98f33e0ab7a0209540279d8bb6c5ad0&incoming=0&outgoing=0&gw_id=default HTTP/1.0
User-Agent: WiFiDog 1.3.0
Host: wifi.schutterstoernooi.nl

]

[7][Wed Jun 21 12:50:54 2017][5284](simple_http.c:87) Reading response
[7][Wed Jun 21 12:50:54 2017][5284](simple_http.c:111) Read 843 bytes
[7][Wed Jun 21 12:50:54 2017][5284](simple_http.c:124) HTTP Response from Server: [HTTP/1.1 301 Moved Permanently
Date: Wed, 21 Jun 2017 12:50:54 GMT
Server: Apache
Location: https://wifi.schutterstoernooi.nl/auth/?stage=counters&ip=192.168.1.150&mac=54:ee:75:34:91:02&token=a352c1d3d98f33e0ab7a0209540279d8bb6c5ad0&incoming=0&outgoing=0&gw_id=default
Content-Length: 483
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://wifi.schutterstoernooi.nl/auth/?stage=counters&amp;ip=192.168.1.150&amp;mac=54:ee:75:34:91:02&amp;token=a352c1d3d98f33e0ab7a0209540279d8bb6c5ad0&amp;incoming=0&amp;outgoing=0&amp;gw_id=default">here</a>.</p>
<hr>
<address>Apache Server at wifi.schutterstoernooi.nl Port 80</address>
</body></html>
]
[6][Wed Jun 21 12:50:54 2017][5284](firewall.c:295) Checking client 192.168.1.150 for timeout:  Last updated 1498049385 (69 seconds ago), timeout delay 300 seconds, current time 1498049454, 
[7][Wed Jun 21 12:50:54 2017][5284](firewall.c:318) Locking client list
[7][Wed Jun 21 12:50:54 2017][5284](firewall.c:318) Client list locked
[4][Wed Jun 21 12:50:54 2017][5284](firewall.c:373) Error communicating with auth server - leaving 192.168.1.150 as-is for now

Stuck at setting up wifidog

Hi,

I have successfully setup the facebook check-in mechanism and is redirected to the 'http://localhost:8080/wifidog/auth?token=3d22ca3d0b29bedecba8e1dfb6fxxxxxxxxxxx'. Problem is now to how to setup wifi dog auth server. Can you elaborate a little bit to how to install wifi dog auth server? Where to get the code and how to install it? I have checked out the code for wifi dog auth server and wifi dog gateway but dont know how to install it. For instance, where to setup GatewayInterface and ExternalInterface in /etc/wifidog.conf?

P.S I am using DD wrt firmware.

Update ?

Hi,

It would be useful if you could update the project and document the changes with what is not needed now. I have it working with my own authserver solution but I have to start the script /etc/init.d/wifidog-fw-start manually otherwise I never get the facebook login.

kind regards

Peter

500 Internal Server Error already use .htaccess

.htaccess info

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} !=/index.php
RewriteRule ^(.*)$ index.php [QSA,L]

Connect to Facebook is working
already Facebook login successful!

but When you "click Check in to Message"
then

500 Internal Server Error

Use of undefined constant place - assumed 'place' (8)

#0 /home/wwwroot/router.xxxx.com/handlers/fb_handlers.php(201): flight\Engine->handleError(8, 'Use of undefine...', '/home/wwwroot/r...', 201, Array)
#1 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(160): handle_checkin()
#2 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(143): flight\core\Dispatcher::callFunction('handle_checkin', Array)
#3 /home/wwwroot/router.xxxx.com/include/flight/flight/Engine.php(313): flight\core\Dispatcher::execute('handle_checkin', Array)
#4 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(191): flight\Engine->_start()
#5 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(142): flight\core\Dispatcher::invokeMethod(Array, Array)
#6 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(48): flight\core\Dispatcher::execute(Array, Array)
#7 /home/wwwroot/router.xxxx.com/include/flight/flight/Engine.php(64): flight\core\Dispatcher->run('start', Array)
#8 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(191): flight\Engine->__call('start', Array)
#9 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(191): flight\Engine->start()
#10 /home/wwwroot/router.xxxx.com/include/flight/flight/Flight.php(76): flight\core\Dispatcher::invokeMethod(Array, Array)
#11 /home/wwwroot/router.xxxx.com/index.php(85): Flight::__callStatic('start', Array)
#12 /home/wwwroot/router.xxxx.com/index.php(85): Flight::start()
#13 {main}

Can not Check In!!
what's going on?

server:PHP/5.4.41 Apache2.4
the facebok api publish_actions i test is working!

Mikrotik

Its possible uses mikrotik as router?

Help :)

Hello, I would like to make a facebook login but have very little experience maybe you have a video for me where it explains what i have to do exactly where and what do i need to install on the router a lot thanks in advance

fb_handlers.php error

Iget a error on the fb_handlers.php because the code (fbsdk) is not updated to the latest fb sdk version it is now on v5 and youre code is trying to use it for v4.

Is it possible to change that?

(i now installed v4 but maybe it is better to use the latest sdk version)

DD-WRT and wifidog - I will pay some money for a fix

Hi guys, i have a tp-link 740n with 4MB flash memory. I installed dd-wrt firmware and enable wifidog with follow configuration
Wifidog is working but it does not redirect to Auth Server after connect to wireless
I can see Auth web on my server
Kindly help me to redirect to auth server after connect or open some website on browser

I tried with OpenWRT but 4MB for flash memory is not enought to install wifidog + dnsmasq-full packeges

1-ddwrt-wifidog

2-status

3-fblan

Facebook seems to be blocked

Hello
I'm running OpenWRT on a small router and somehow I got some trouble with "ipset". Is there somehow a trick how to fix that? I saw that "dnsmasq-full" is installed properly, do I still need "dnsmasq" if I have "dnsmasq-full"?

Following error messages appear:

root@OpenWrt:~# /etc/init.d/wifidog-fw-extra restart
iptables v1.4.21: Set fb doesn't exist.

Try 'iptables -h' or 'iptables --help' for more information.

And this:

root@OpenWrt:~# fw3 reaload
Warning: Unable to locate ipset utility, disabling ipset support

Stuck on login

Hi, i'm trying to test the script but i'm already stuck on the fake login part. it returns 404. Without login the startpage is served but the fb integration is not possible for me to test right now. What could be the problem? I'm trying the fake login. that causes 404. No where in the startpage is a FB functionality visible.

Error posting to Facebook (No nonce in form submission! (0)

Hi,

I'm trying to use your captive portal, however on the last step (../checkin?...) I always get this error.

Is there any way to fix it?
Thanks in advance

500 Internal Server Error

No nonce in form submission! (0)
#0 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(160): handle_checkin()
#1 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(143): flight\core\Dispatcher::callFunction('handle_checkin', Array)
#2 /var/www/fbwlan/include/flight/flight/Engine.php(312): flight\core\Dispatcher::execute('handle_checkin', Array)
#3 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(191): flight\Engine->_start()
#4 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(142): flight\core\Dispatcher::invokeMethod(Array, Array)
#5 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(48): flight\core\Dispatcher::execute(Array, Array)
#6 /var/www/fbwlan/include/flight/flight/Engine.php(64): flight\core\Dispatcher->run('start', Array)
#7 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(191): flight\Engine->__call('start', Array)
#8 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(191): flight\Engine->start()
#9 /var/www/fbwlan/include/flight/flight/Flight.php(65): flight\core\Dispatcher::invokeMethod(Array, Array)
#10 /var/www/fbwlan/index.php(85): Flight::__callStatic('start', Array)
#11 /var/www/fbwlan/index.php(85): Flight::start()
#12 {main}

"FacebookRedirectLoginHelper.php" fatal error

I am trying to set up a new gateway system on Raspberry Pi. My previous auth server stays unchanged. However after I set up wifidog, etc., I get the following error when I try to auth through Facebook. My previous gateway based on openwrt was working perfectly. I am not sure if this is an issue of my set up on Raspberry Pi, or the auth server? Auth through code is working fine.

Fatal error: Cannot use object of type stdClass as array in /include/facebook-php-sdk-v4/src/Facebook/FacebookRedirectLoginHelper.php on line 192

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.