-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To fetch the information of users engaged in a post #158
Comments
I don't think Facebook freely publish that information. |
This PR (#201) in conjunction with this PR (#188, already merged) could make this possible (for commenters, not likers). Sample code: posts = list(get_posts(post_urls=["https://m.facebook.com/story.php?story_fbid=1917763655047425&id=285708024919671"], cookies="cookies.txt", options={"comments":True}))
for commenter in posts[0]["comments_full"]:
account = commenter.get("commenter_url").replace("https://facebook.com/", "").split("?")[0]
profile = get_profile(account, cookies="cookies.txt", timeout=15)
print(account, profile.get("Basic info")) returns: jess.anshaw {'Gender': 'Female'}
christine.salt.14 {'Gender': 'Female'}
paris.atkins15 None
Nephtis None
hannah.styles.96 {'Gender': 'Female'}
rebekah.nicholson.3 {'Gender': 'Female'}
jessica.holt.393 {'Gender': 'Female'}
alexwhitedgm {'Gender': 'Male'}
chelsie.foster.5 {'Gender': 'Female', 'Languages': 'English language'}
steven.gigacz {'Gender': 'Male'} |
As of #194 (comment) you can now extract users reacting to a post. Note that Like is just one of 7 possible reaction types. |
yeah, if you're not logged in / passing cookies, commenter_url will always be None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the work.
Following collecting the number of likes/comments/shares, I would like to collect the demographic information of the users who engaged in a post. More specifically, given a post with 98 likes, I would like to investigate the age and gender distribution of them. Thus I assume I need to firstly identify the users engaged in a post, and tracing back to their information, and check if there are publicly available gender and year of birth.
So I am wondering if it is possible to make it, given I can only get access to the profile information publicly available.
The text was updated successfully, but these errors were encountered: