Authored by 周奇琪

添加auth方法

Showing 1 changed file with 23 additions and 2 deletions
... ... @@ -66,11 +66,32 @@ app.post('/fb',function(req,res)
FB.setAccessToken(at);
FB.api(method,'post',body,function (resp)
{
console.log(resp);
res.send(resp);
console.log(resp);
res.send(resp);
});
});
app.get('fb/auth',function(req,res)
{
FB.api(req.param("method"),
req.params, function (resp)
{
console.log(resp);
res.send(resp);
});
});
app.post('fb/auth',function(req,res)
{
FB.api(req.body.method,
req.body, function (resp)
{
console.log(resp);
res.send(resp);
});
});
app.listen(80);
app.get('/google',function(req,res)
... ...