Skip to content

mdaashir/EmoEcho

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Instagram Sentiment Analysis

Prerequisites

Before you begin, ensure you have met the following requirements:

Getting Started

Clone the repository:

git clone https://github.com/instaboy007/instagram-sentiment-analysis.git
cd instagram-sentiment-analysis

Setting up Facebook Developer Account

Refer [https://developers.facebook.com/docs/instagram-basic-display-api/getting-started/]

Setting up the Server

  1. Navigate to backend Directory
cd backend
  1. Create a Virtual Environment
python -m venv venv
  1. Activate the Virtual Environment
venv\scripts\activate
  1. Install Packages from requirements.txt
pip install -r requirements.txt
  1. Execute the Following Commands:

    python
    import nltk
    nltk.download('vader_lexicon')
    exit()
  2. Start the Server

cd server
python manage.py runserver

Setting up Ionic App

  1. From the Root Directory Navigate to frontend/app Directory
cd frontend/app
  1. Install Node Modules
npm install
  1. Replace Client ID and Client Secret from Instagram App created from the Facebook Developer Dashboard in the frontend/src/context/authContext.tsx

  2. Run the Ionic Development Server

ionic serve

This will start the Developlment Server running at http://localhost:8100/

Setting up ngrok

  1. Install Ngrok ([https://ngrok.com/download]) Extract Zip file to a Directory and Navigate to that directory

  2. Open this Directory in cmd (directory with ngrok.exe)

  3. Login to [https://dashboard.ngrok.com/login] and from the Left Menu navigate to Getting Started > Your Auth Token. Copy your Auth Token

  4. Run the following command to add your authtoken to the default ngrok.yml configuration file

ngrok config add-authtoken <YOUR_AUTH_TOKEN>
  1. Deploy your app online
ngrok http 8100

Here the Port is same as the Ionic Development Server

  1. Copy the Forwarding Link

Example: Forwarding [https://13a8-2405-201-e033-7054-e08d-ed5c-20f4-b6c9.ngrok-free.app] -> http://localhost:8100

Deployed Link is [https://13a8-2405-201-e033-7054-e08d-ed5c-20f4-b6c9.ngrok-free.app]

Open this in Browser to View the Deployed App.

  1. Open frontend/src/context/authContext.tsx replace the redirect_uri with the Deployed Link followed by /authorization route. Example: https://13a8-2405-201-e033-7054-e08d-ed5c-20f4-b6c9.ngrok-free.app/authorization

  2. Replace the Valid OAuth Redirect URIs, Deauthorize callback URL, Data Deletion Request URL in the Facebook Developer Portal with the same ([https://13a8-2405-201-e033-7054-e08d-ed5c-20f4-b6c9.ngrok-free.app/authorization]).

  3. Open backend/server/server/settings.py replace "https://<YOUR_DEPLOYED_LINK>" with the Deployed Link for ALLOWED_HOSTS and CROSS_ORIGIN_WHITELIST. Example: [https://13a8-2405-201-e033-7054-e08d-ed5c-20f4-b6c9.ngrok-free.app]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 42.9%
  • Python 33.7%
  • CSS 20.4%
  • HTML 2.2%
  • JavaScript 0.8%