Authored by 周奇琪

添加auth方法

Showing 1 changed file with 21 additions and 0 deletions
@@ -71,6 +71,27 @@ app.post('/fb',function(req,res) @@ -71,6 +71,27 @@ app.post('/fb',function(req,res)
71 }); 71 });
72 }); 72 });
73 73
  74 +app.get('fb/auth',function(req,res)
  75 +{
  76 + FB.api(req.param("method"),
  77 + req.params, function (resp)
  78 + {
  79 + console.log(resp);
  80 + res.send(resp);
  81 + });
  82 +});
  83 +
  84 +app.post('fb/auth',function(req,res)
  85 +{
  86 + FB.api(req.body.method,
  87 + req.body, function (resp)
  88 + {
  89 + console.log(resp);
  90 + res.send(resp);
  91 + });
  92 +});
  93 +
  94 +
74 app.listen(80); 95 app.listen(80);
75 96
76 app.get('/google',function(req,res) 97 app.get('/google',function(req,res)