Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to connect to Facebook Graph API from Python using Requests if I do not need user access token?
    primarykey
    data
    text
    <p>I am trying to find the easiest way how to use Facebook Graph API using my favorite <a href="http://docs.python-requests.org/" rel="nofollow noreferrer">Requests</a> library. The problem is, all examples I found are about getting <strong>user access token</strong>, about redirects and user interaction.</p> <p>All I need is only <strong>application access token</strong>. I do not handle any non-public data, so I need no user interaction and as my final app is supposed to be command-line script, no redirects are desired.</p> <p>I found something similar <a href="https://stackoverflow.com/questions/3058723/programmatically-getting-an-access-token-for-using-the-facebook-graph-api">here</a>, but it seems to be everything but elegant. Moreover, I would prefer something using <a href="http://docs.python-requests.org/" rel="nofollow noreferrer">Requests</a> or <a href="https://github.com/maraujop/requests-oauth2" rel="nofollow noreferrer">Requests-OAuth2</a>. Or maybe there is library for that? I found <a href="https://github.com/maraujop/requests-oauth2" rel="nofollow noreferrer">Requests-Facebook</a> and <a href="https://github.com/jgorset/facepy" rel="nofollow noreferrer">Facepy</a> (both Requests based), but again, all examples are with redirection, etc. Facepy does not handle authorization at all, it just accepts your token and it is up to you to get it somehow.</p> <p>Could someone, please, provide a short, sane, working example how to get just the application access token?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload