Skip to content

Commit

Permalink
adjusted timeout and added secondary redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Apr 2, 2013
1 parent fab2419 commit 8234323
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/index.js
Expand Up @@ -9,13 +9,15 @@
server = connect.createServer()
.use(connect.query())
.use('/scan', function (request, response) {
// right now assuming fb://profile/OBJECT_ID
var uri = encodeURI(request.query.fb)
, id = uri.split('/').pop()
;

response.write('<html>'
+ '<head><meta http-equiv="refresh" content="0;URL=fb://' + uri + '"></meta></head>'
+ '<body>Go to <a href="http://fb.com/CoolAJtheDJ">Facebook</a> and click \'Like\'.'
+ '<br>' + uri
+ '<body>Redirecting to <a href="http://fb.com/"' + uri + '>Facebook</a> so you can \'Like\'...'
+ '<script>setTimeout(function () { location.href="http://fb.com/' + id + '"}, 1300);</script>'
+ '</body>'
+ '</html>');
response.end();
Expand Down

0 comments on commit 8234323

Please sign in to comment.