Skip to content

Get user_id from username #371

Answered by neon-ninja
alvaroserrrano asked this question in Q&A
Discussion options

You must be logged in to vote

The get_profile function should do it. Here's an example:

from facebook_scraper import get_profile
from pprint import pprint
pprint(get_profile("zuck"))

outputs

{'About': "I'm trying to make the world a more open place.",
 'Education': 'Harvard University\n'
              'Computer Science and Psychology\n'
              '30 August 2002 - 30 April 2004\n'
              'Phillips Exeter Academy\n'
              'Classics\n'
              'School year 2002\n'
              'Ardsley High School\n'
              'High School\n'
              'September 1998 - June 2000',
 'Favourite Quotes': '"Fortune favors the bold."\n'
                     '- Virgil, Aeneid X.284\n'
                     '\n'

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@neon-ninja
Comment options

@alvaroserrrano
Comment options

@neon-ninja
Comment options

@alvaroserrrano
Comment options

@neon-ninja
Comment options

Answer selected by neon-ninja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants