Simple basic script to retrieve and perform Sentiment Analysis on Facebook Posts.
Dependencies
- facebook-sdk
- NLTK
- TextBlob
- Facebook Access Token
Setup
- Install NLTK:
- Download the corpora files and trained model:
$ python
>>> import nltk
>>> nltk.download('all')
- install facebook-sdk and TextBlob:
$ sudo pip install facebook-sdk TextBlob
- Get your ACCESS_TOKEN: https://developers.facebook.com/docs/graph-api/overview
Usage
$ python simple_facebook_sentiment_analysis.py --access_token YOUR_ACCESS_TOKEN --profile=profilename