Code Monkey home page Code Monkey logo

fmetric's Introduction

fmetric

fmetric is a python script to fetch facebook users and interaction score with facebook page. This sciprt reads all recent public post including comment on post and like using facebook graph api. It will generate csv file which includs user id and score of interaction.

Usage

First, download source code:

git clone [email protected]:blikenoother/fmetric.git

Now, move to the direcotry, run the following command

cd fmetric
nohup python fetchdata.py ACCESS_TOKEN PAGE_ID POST_COUNT &

Description:

ACCESS_TOKEN valide facebook app access token (you can get access token at developers.facebook.com)
PAGE_ID facebook page id (to get page id, http://graph.facebook.com/PAGE_NAME)
POST_COUNT number of posts to read
& to run python script in background

Example to read 50 post and get engaged user id for http://facebook.com/facebook page:

nohup python fetchdata.py XXXXXXXX 20531316728 50 &

It will generate a csv file with page id, like 20531316728.csv for above example

Score detail:

1 point for like on post 2 point for writing comment on post 3 point for writing post

You can edit points allocation at line number 4 (points = {'post': 3, 'commnet': 2, 'like': 1}) in fetchdata.py

Logs:

You can check logs or any error in nohup.out which will be generated when you execute the script.

Chirag (blikenoother -[at]- gmail [dot] com)

fmetric's People

Contributors

blikenoother avatar

Stargazers

Ocn avatar Matthew Levandowski avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.