Facebook-Sentiment-Analysis icon indicating copy to clipboard operation
Facebook-Sentiment-Analysis copied to clipboard

Basic script to retrieve and perform Sentiment Analysis on Facebook Posts.

Facebook-Sentiment-Analysis

Simple basic script to retrieve and perform Sentiment Analysis on Facebook Posts.

Dependencies

  • facebook-sdk
  • NLTK
  • TextBlob
  • Facebook Access Token

Setup

  • Install NLTK:
  • http://www.nltk.org/install.html
  • 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