Skip to main content

Extract data created in a corporate Workplace by Facebook installation using the Graph/SCIM APIs

Project description

Workplace Extractor

Python package to extract posts from

Overview

The Workplace Extractor package was written to allow a complete extraction of posts form a Workplace installation. It provides the following key features:

  • Access to the SCIM and GRAPH API provided by Facebook;
  • Asyncronous calls to increase speed;
  • Lists of posts, members, groups, comments, event attendees are exported to CSV files;
  • A ranking of most relevant members can be created based on the number of interctions (comments and reactions)
  • The interaction network can be wxported to a GEXF file;

Usage

Installation

To get the Workplace Extractor package, either fork this github repo or use Pypi via pip.

$ pip install workplace_extractor

How to use it

You can simple run a python script with the code below:

import workplace_extractor

workplace_extractor.run()

This package uses argparse and Gooey to create an end-user-friendly front end GUI application. Just run the app and a dialog will show up asking for the input parameters.

The application will offer some extraction options:

  1. POSTS - used for extracting all posts published in a given period of time or feed, from a given author etc.

  2. Comments - used for extracting all comments made in a post.

  3. People - used for extracting all Workplace users.

  4. Groups - used for all groups.

  5. Members - used for extracting all members of a group

  6. Attendees - used for extracting all attendees of an event.

  7. Interactions - used for extracting interactions among all workplace users. This option can be used can be used with a network visualization solution, such as Gephi, for further analysis.

You must have an access token with full access to both SCIM and GRAPH API in order to the extraction to work

A config.ini file con be used to set some key parameters. Two required ones are:

  • output_dir - path the folder where the output will be stored
  • access_token - path to a file containing the Workplace access token

Warning

As many http calls are made during the export process, your program may take a while to finish, depending on the size of your Workplace installation. As a reference, on an installation with around 85,000 users, 3,000 groups and 110,000 posts the exectution takes around 4 hours to complete.

License

License: MIT

Copyright 2021 Denis Duarte

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

workplace_extractor-0.9.9.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

workplace_extractor-0.9.9-py2.py3-none-any.whl (27.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file workplace_extractor-0.9.9.tar.gz.

File metadata

  • Download URL: workplace_extractor-0.9.9.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.10 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for workplace_extractor-0.9.9.tar.gz
Algorithm Hash digest
SHA256 3df6e0083e299347c4913a2bb4d55f16e6e89be6f45c5d4345a73bd1a49d3705
MD5 0763e6d5d50a9ad4c9395f89bfe4b0ec
BLAKE2b-256 34bc90d88a3b98f2733764d8fc3a80711cd635d6cd55706c0cc7fd192dc77d5d

See more details on using hashes here.

File details

Details for the file workplace_extractor-0.9.9-py2.py3-none-any.whl.

File metadata

  • Download URL: workplace_extractor-0.9.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.10 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for workplace_extractor-0.9.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7e69f84a6e89cb8f6952da2f80abd6835a324605123726a29eff815c44e2e91b
MD5 8ce538b6ad046bcaf67a9c86d774a8b3
BLAKE2b-256 ccd25220c9571ca1c472c6c102c880cebdd51622175278c2810c28dbf160607f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page