Greetings! I know a little bit about Django, even less Python, and don’t know anything about FB API. I need to build a web app that would get statistics for my FB Page, analyze it and display the way I need. Please push me to the right direction. Maybe there is some Django module specialized for that? Thanks in advance.
Break this down into at least two smaller parts:
-
Getting the data from FB
-
Displaying it in Django.
For part 1, you need to decide when you’re going to get the data. Do you want to retrieve the data every time you go to a page, or do you only want to retrieve the data periodically?
In either case, you’ll probably want to use the Python requests
library to fetch the data - unless there’s a Python-specific library already designed to retrieve data from the Facebook APIs.
Once you’ve got the data, you can then store it in an appropriate set of models, and create your views to display that data. (At this point, this has nothing specifically to do with Facebook - it’s just data.)
Thanks! So far I just want to get data from API and display without saving to database. Was wonder if there is some Django-fb module. ) Well, will read fb docs then.
There are lots of Django / FB integration modules - do a search in djangopackages.org
. However, most of them are either old/obsolete and/or are focused primarily for using FB for authentication or for retrieving posts.
Thanks! I will search.