Chrome Extension - Facebook graphhql to obtain information related to the friends of a personal Facebook profile.

Job ID: 34797373

Budget: $100 – $200 USD

VERY VERY IMPORTAN Instructions:

1. Please read the project specifications carefully.
2. Adjust your final offer according to what you consider you should charge for the development
3. In case of specific doubts, these will be resolved through the Freelancer chat
4. I will not answer things like tell me more about your project, tell me about your project, what is your project about
5. I will not answer questions such as what your budget is (after reviewing the information and answering any particular questions, please adjust your final offer)

General objective of the project:

Use facebook graphql to obtain information related to the friends of a personal Facebook profile (Picture, Fbid, Username, Name, Friend since, Reactions, Comments, Messages Gender, Conversations, Country, Is Active).

The functionality that is being modeled is the one described in the shared video, which refers to Sync and Analyze.

https://youtu.be/FMta3cza9RE?t=145

From this link you can download the extension and analyze the code with the intention of getting an idea of ​​what is required to program

https://chrome.google.com/webstore/detail/genius-disconnector/efnhameebhmajhmadlgcpipoeeaejccb

The project will only be accepted and terminated when the end result is a Chrome extension or java script that uses the facebook graphql, as the extension in the shared example does.

Where the user does not have to enter additional data for it to work.

Where the extension extracts and displays the information of interest in the manner described below.
Get the token:

The first step will be for the Chrome extension to automatically obtain the token that allows it to query the graphql.

I've done some research on this topic and found these steps to get the access token:

Option 1 (I think this is the right option):

The token can be found by finding a pattern in the html source of the friend list page:

https://web.facebook.com/profile.php?id=numericfacebookid&sk=friends

console.log(/\["DTSGInitData",\[\],{"token":"\S+","async_get_token":"\S+?"},\d+\]/g.exec(document.body.innerHTML)[0].replace('fffffffff', ''))

Option 2:

https://youtu.be/ikISl46sMo8?t=31

https://business.facebook.com/creatorstudio/home

console.log(/userAccessToken":"(E[^"]+)/g.exec(document.body.innerHTML)[0].replace('userAccessToken\"\:\"', ''))

Consider two options and check if the token obtained serves the development purposes, in case it did not work, the solution should be proposed.
Use graphql to obtain information of interest.
Reference pages that can help with development.

Read_your_network_of_friends_in_Facebook_by_scraping_with_Python.ipynb (pay special attention to the section: Read list of friends)

https://github.com/rubchume/FacebookFriendNetworkAnalyzer/blob/master/Read_your_network_of_friends_in_Facebook_by_scraping_with_Python.ipynb

The JavaScript reference implementation for GraphQL, a query language for APIs created by Facebook.
https://github.com/graphql/graphql-js

Facebook Group:

https://www.facebook.com/groups/graphql.community/

I share the following file to help and give an idea of the type of calls that have to be made to the grapghl of fB:

https://drive.google.com/file/d/1e4CKbSp6-qMFL7TpIpl4NNfcclRMx-17/view?usp=sharing

*** The detailed description of the specifications are available at the following link. ***

https://docs.google.com/document/d/1Fe0hIEPOdUycCkUp2RtbpA73qaJQ69-1ratsYFtnWKA/edit?usp=sharing
Related categories: JavaScript Web Scraping Google Chrome Facebook API API