mohoazure / fb-auto-reporter Goto Github PK
View Code? Open in Web Editor NEWA fb page bot automatically collects news and makes reports
A fb page bot automatically collects news and makes reports
make a python script to be automatically executed.
Doc
https://developers.facebook.com/docs/pages/publishing
Create an app, a token, and permissions for the bot
https://developers.facebook.com/
Page under test
https://www.facebook.com/HBY-bot-427810290948882/
When posting a weather or a page news report, send page admin a copy (at least the link to the report).
https://hackernoon.com/beginners-guide-simple-chat-bot-fb-based-on-flask-and-heroku-2g7v32ab
For now, a free worker dyno is used by this app, and it cannot provide service through out a month once the free quota is consumed.
[Ref] https://devcenter.heroku.com/articles/free-dyno-hours#dyno-sleeping
A heroku worker would sleep if the dyno receives no web traffic in a 30-minute period.
Apps that only utilise a free worker dyno do not sleep, because they do not respond to web requests.
Free web dynos do not consume free dyno hours while sleeping.
Possible solution: heroku clock
https://devcenter.heroku.com/articles/clock-processes-python
No news is reported, only pre-defined messages.
This may not be a problem since the pages really have no posts at 00:00~0700.
fix time checking in fb news collector.
datetime.today().date() returns date of the machine.
For a user residents in a time zone different from the machine, the user may get news create in yesterday.
For example, a machine is in UTC+0, a user is in UTC+8, and a news is created in 2020-11-30 08:00:01 in UTC+8, the date of the news is considered as 'today' by the machine but not by the user.
A User is messaging with the Bot.
The current scheduling mechanism is not good enough.
The script follows time zone used by the deployed machine.
Error message: This message is sent outside of allowed window
network request/post analysis
https://tlyu0419.github.io/2020/03/17/Crawl-Facebook-Pages/
tlyu0419/TLYu0419.github.io#15
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.