sns-sdks / python-facebook

A simple Python wrapper for facebook graph api :sparkles: :cake: :sparkles: .
https://sns-sdks.github.io/python-facebook/
322 stars 84 forks source link

exchange_long_lived_page_access_token wrong connection #219

Closed lucas-montes closed 1 year ago

lucas-montes commented 1 year ago

When calling the method exchange_long_lived_page_access_token of the API class y get the following exception

pyfacebook.exceptions.FacebookError: FacebookError(code=100,message=(#100) Tried accessing nonexisting field (accounts) on node type (Page),type=OAuthException,fbtrace_id=AblWlhmwS_6ebMzoggXzdRs)

MerleLiuKun commented 1 year ago

This method need ID for user. Not ID for page.

And this method to get the basic fields (include page access token) for all pages belonging to a Facebook user.