https://github.com/nixilla/facebookmocker
Mocks Facebook for OAuth authentication
https://github.com/nixilla/facebookmocker
Last synced: 2 months ago
JSON representation
Mocks Facebook for OAuth authentication
- Host: GitHub
- URL: https://github.com/nixilla/facebookmocker
- Owner: nixilla
- Created: 2012-05-03T09:26:51.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-05-03T11:00:26.000Z (about 13 years ago)
- Last Synced: 2025-02-08T21:16:57.969Z (4 months ago)
- Language: PHP
- Size: 97.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
FacebookMocker
==============Mocks Facebook for OAuth authentication
Installation
------------git clone git://github.com/nixilla/FacebookMocker.git your_folder
cd your_folder
wget http://silex.sensiolabs.org/get/silex.pharSample nginx config
server {
listen your_ip:80;listen your_ip:443 ssl;
ssl_certificate /etc/nginx/ssl/some.crt;
ssl_certificate_key /etc/nginx/ssl/some.key;server_name facebook.com graph.facebook.com www.facebook.com;
root /path/to/your_folder/web;
index index.php;access_log /var/log/nginx/facebook.com.access_log main;
error_log /var/log/nginx/facebook.com.error_log info;location / {
if (-f $request_filename) {
expires max;
break;
}if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") {
rewrite ^(.*) /index.php last;
}
}location ~ \.php($|/) {
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_FILENAME $document_root/$script;
fastcgi_param SCRIPT_NAME $script;
}
}Edit your /ets/hosts and add this line:
your_ip facebook.com graph.facebook.com www.facebook.com
Note:
This config (in /etc/hosts) will completely redirect all traffic to facebook.com to your_ip which is on your server.
This setting is meant for testing your app with the Facebook OAuth, so don't forget to remove it after you're done.
Otherwise you won't be able to access Facebook. Don't blame me, as I just warned you.