[JS] [Node.js] facebook authentication demo
 
      流程  這是不使用任何facebook sdk的方法   首先要去fb新開一個app  https://developers.facebook.com/apps/3xxx21/summary?save=1   在裡面填入app的uri, eg. http://localhost:8888/demo.html  (注意:之後app要redirect_uri的uri,必須填在裡面)         參考 Client-side authentication without the JS SDK  要填入的只有以下項目:  https://www.facebook.com/dialog/oauth?     client_id=YOUR_APP_ID    &redirect_uri=YOUR_REDIRECT_URI    &scope=COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES    &response_type=token   所以我們知道要用app redirect此url到fb做認證  https://www.facebook.com/dialog/oauth?client_id=3xxx021&redirect_uri=http://localhost:8888/demo.html&response_type=token   在認證成功後,fb會redirect到你指定出的redirect_uri,  http://localhost:8888/demo.html#access_token=AAAxxxxWPTM2xF&expires_in=6807   由url hash可以得到access_token  就可以使用fb graph api了   可以參考fb的流程圖:           demo        app.js    var server,      ip   = "localhost",      port = 8888,      http = r...