facebookarchive / fbconsole

A micro api client for writing scripts against the Facebook Graph API.
Other
325 stars 74 forks source link

Use requests library instead of manual post/multipart code #39

Open psineur opened 9 years ago

psineur commented 9 years ago

Summary:

First commit removes automatic auth, since I wasn't able to make it work and can't test it, looks like others have this problem as well ( #25 ) Then just small cleanup for unused imports and main change to use requests

Test Plan:

python setup.py test and make sure authenticate() and shell mode are still working

@bgolub @mduppes @adamgross42 I guess we can use Pull Requests like this for Diff Review

lsoltero commented 9 years ago

automatic_authentication is working for me. Happy to work with you to get this working. I think the trick is that a valid URL has to be set for the call back. It doesn't matter what the call back url is. we are using our company home page. Once setup the owner of the app can use his FB login credentials to post to /me/feeds /me/photos without issue.

psineur commented 9 years ago

Hey! This is really good to hear.

Can you create a test user & make it work for this user & post it here? Or you can shoot me an email with credentials I can try to use.

My problem when I try to use my account ( just tried) is that throw is happening here:

421     oauth = parse_qs(auth_url.query)
422     if "state" not in oauth:

--> 423 raise AutomaticLoginError

looks like redirect doesn't happen yet but logic, that needs 'state' tries to kick in.

Can you provide details how exactly you managed auto auth to work? + your python, os versions? Thanks!

facebook-github-bot commented 7 years ago

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.

Before we can review or merge your code, we need you to email cla@fb.com with your details so we can update your status.