{"id":20619732,"url":"https://github.com/twtrubiks/flask-login-example","last_synced_at":"2025-07-11T17:43:26.380Z","repository":{"id":84518951,"uuid":"74883215","full_name":"twtrubiks/Flask-Login-example","owner":"twtrubiks","description":"Login register facebook Login - Python Flask","archived":false,"fork":false,"pushed_at":"2018-03-27T03:17:21.000Z","size":81,"stargazers_count":43,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T14:08:48.165Z","etag":null,"topics":["facebook-api","facebook-developers","flask","flask-login","python","register","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twtrubiks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-27T11:23:36.000Z","updated_at":"2024-03-10T18:42:53.000Z","dependencies_parsed_at":"2023-03-02T04:30:27.798Z","dependency_job_id":null,"html_url":"https://github.com/twtrubiks/Flask-Login-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/twtrubiks/Flask-Login-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2FFlask-Login-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2FFlask-Login-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2FFlask-Login-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2FFlask-Login-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twtrubiks","download_url":"https://codeload.github.com/twtrubiks/Flask-Login-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2FFlask-Login-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264864105,"owners_count":23675292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["facebook-api","facebook-developers","flask","flask-login","python","register","tutorial"],"created_at":"2024-11-16T12:12:23.180Z","updated_at":"2025-07-11T17:43:26.312Z","avatar_url":"https://github.com/twtrubiks.png","language":"Python","readme":"# Flask-Login-example\nLogin register facebook Login - Python Flask\n\n* [Demo](https://youtu.be/5RlzqPz9oN8)  \n\n常看到別人的網站有登入、註冊、使用FACEBOOK登入，今天教你使用 Python [Flask](http://flask.pocoo.org/) 建立一個。\n\n使用 Python [Flask](http://flask.pocoo.org/) 搭配 [Flask-Login](https://flask-login.readthedocs.io/en/latest/)  實現登入機制，也透過 [Facebook API](https://developers.facebook.com/)完成常見的使用Facebook登入。\n\n## 特色\n* 搭配 [Flask-Login](https://flask-login.readthedocs.io/en/latest/) 實現登入、註冊機制。\n* 透過 [Facebook API](https://developers.facebook.com/) 完成常見的使用 Facebook 登入。\n* 資料庫(database)使用 SQLite。\n\n## 安裝套件 Flask-Login \n請先確定電腦有安裝 [Python](https://www.python.org/)\n\n### Flask-Login\n``` \npip install flask-login\n```\n更多 Flask-Login ，可參考  [Flask-Login](https://github.com/maxcountryman/flask-login) \n\n## 使用Facebook登入-前置作業\n請先到  [facebook-developer](https://developers.facebook.com/)，點右上角的 \u003cb\u003e我的應用程式\u003c/b\u003e，選 \u003cb\u003e新增應用程式\u003c/b\u003e，\n\n接著輸入 \u003cb\u003e顯示名稱\u003c/b\u003e 以及選擇 \u003cb\u003e類別\u003c/b\u003e，如下圖\n\n![alt tag](http://i.imgur.com/8szV6O9.jpg)\n\n接著頁面會跳到\n![alt tag](http://i.imgur.com/AX0Zurh.jpg)\n\n選擇 \u003cb\u003e新增平台\u003c/b\u003e，這裡選擇 \u003cb\u003e網站\u003c/b\u003e 當作範例\n![alt tag](http://i.imgur.com/N6dmksa.jpg)\n\n輸入 \u003cb\u003e網域\u003c/b\u003e，這裡先輸入 \u003cb\u003elocalhost\u003c/b\u003e\n![alt tag](http://i.imgur.com/pgqvVvv.jpg)\n\n接下來將你的 \u003cb\u003e 應用程式編號\u003c/b\u003e 貼到下方\n\n``` \nwindow.fbAsyncInit = function() {\n      FB.init({\n        appId      : 'your-app-id',\n        cookie     : true,  // enable cookies to allow the server to access\n                            // the session\n        xfbml      : true,  // parse social plugins on this page\n        version    : 'v2.8' // use graph api version 2.8\n      });\n  };\n```\n更詳細的請看 Facebook JavaScript SDK，請到 [facebook developers](https://developers.facebook.com/docs/facebook-login/web)。\n\n## 執行畫面\n登入頁\n\n![alt tag](http://i.imgur.com/7vgeRit.jpg)\n\n註冊頁\n\n![alt tag](http://i.imgur.com/4wUdDpN.jpg)\n\n使用Facebook登入\n![alt tag](http://i.imgur.com/uSAIAlY.jpg)\n\n## 執行環境\n* Python 3.4.3\n\n## Reference \n* [Flask-Login](https://github.com/maxcountryman/flask-login) \n* [facebook developer](https://developers.facebook.com/docs/javascript) \n\n## External JS\n* [jQuery Validation](https://jqueryvalidation.org/) \n\n## Donation\n\n文章都是我自己研究內化後原創，如果有幫助到您，也想鼓勵我的話，歡迎請我喝一杯咖啡:laughing:\n\n![alt tag](https://i.imgur.com/LRct9xa.png)\n\n[贊助者付款](https://payment.opay.tw/Broadcaster/Donate/9E47FDEF85ABE383A0F5FC6A218606F8)\n\n## License\nMIT license\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwtrubiks%2Fflask-login-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwtrubiks%2Fflask-login-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwtrubiks%2Fflask-login-example/lists"}