Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9114949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:18:56+00:00 2026-06-17T04:18:56+00:00

I am doing a project for school where I have to get all of

  • 0

I am doing a project for school where I have to get all of my friend data, and the friend data of some of my friends, from facebook in order to make a graph of it. To do this I am planning on using facepy, but in order to do that I need an access token. My question is how do I obtain this access token?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:18:57+00:00Added an answer on June 17, 2026 at 4:18 am

    facepy doesn’t natively include a way for the OAuth process

    https://github.com/jgorset/facepy/issues/22

    You will need to use your own method or external library for the user to be guided via a web application.

    Server Login

    For example using web.py and facepy to get me/posts with read_stream permission

    import web
    from facepy import GraphAPI
    from urlparse import parse_qs
    
    url = ('/', 'index')
    
    app_id = "YOUR_APP_ID"
    app_secret = "APP_SECRET"
    post_login_url = "http://0.0.0.0:8080/"
    
    user_data = web.input(code=None)
    
    if not user_data.code:
        dialog_url = ( "http://www.facebook.com/dialog/oauth?" +
                                   "client_id=" + app_id +
                                   "&redirect_uri=" + post_login_url +
                                   "&scope=read_stream" )
    
        return "<script>top.location.href='" + dialog_url + "'</script>"
    else:
        graph = GraphAPI()
        response = graph.get(
            path='oauth/access_token',
            client_id=app_id,
            client_secret=app_secret,
            redirect_uri=post_login_url,
            code=code
        )
        data = parse_qs(response)
        graph = GraphAPI(data['access_token'][0])
        graph.get('me/posts')
    

    For more info see

    * Facebook API – User Posts: http://developers.facebook.com/docs/reference/api/user/#posts
    * Publish a Facebook Photo in Python – The Basic Sauce: http://philippeharewood.com/facebook/publish-a-facebook-photo-in-python-the-basic-sauce/
    * Facebook and Python – The Basic Sauce: http://philippeharewood.com/facebook/facebook-and-python-the-basic-sauce/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I am in the process of doing a school project, where we have
I am doing a simple project in school and I need to make six
I'm doing a school project, I need to make a simple web site, add
I am doing a project in school, I have to create a website tool
I'm doing this project for school and for some reason one of by Buttons
Hi i am currently doing a school project using cakePHP. I have the following
I'm working on a project for school and need to sort some data. I've
Alright, so I'm doing a school project where I have to implement Space Invaders
I'm doing a project for school, so I need to compile it with: gcc
BACKGROUND I'm doing an interactive art project for school. PROCESS For this project the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.