New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuously "couldn't authenticate" #28

Closed
komposure opened this Issue Oct 22, 2015 · 7 comments

Comments

Projects
None yet
3 participants
@komposure

komposure commented Oct 22, 2015

Sanity warning: this is probably an issue with how I'm producing access tokens, rather than the API.

I have attempted to use an access token (created by https://developers.facebook.com/tools/explorer/ and checking every single permission, outputting something that looks like: CAACEdE ... dCqIkf6krQECVGfaOsPqBk), and the ID provided by the GET > /v2.5/me?fields=id,name (looking similar to the format 10153 ... 52316).

However, the example to like 5 users always returns the following:

Traceback (most recent call last):
File "like_5_users.py", line 6, in <module>
session = pynder.Session(FBID, FBTOKEN)
File "build/bdist.linux-x86_64/egg/pynder/session.py", line 14, in __init__
File "build/bdist.linux-x86_64/egg/pynder/api.py", line 26, in auth
pynder.errors.RequestError: Couldn't authenticate

Is there a way to create these tokens automatically, so that newbies like me can't bugger it up? If not, what's the process to create a token and ID that works?

@charliewolf

This comment has been minimized.

Show comment
Hide comment
@charliewolf

charliewolf Oct 22, 2015

Owner

Sanity check: Can you try generating a token using the method outlined here?

Owner

charliewolf commented Oct 22, 2015

Sanity check: Can you try generating a token using the method outlined here?

@komposure

This comment has been minimized.

Show comment
Hide comment
@komposure

komposure Oct 22, 2015

It worked! Weirdly, that was the first method I'd tried, thanks Charlie :)

komposure commented Oct 22, 2015

It worked! Weirdly, that was the first method I'd tried, thanks Charlie :)

@komposure

This comment has been minimized.

Show comment
Hide comment
@komposure

komposure Oct 22, 2015

Is there any way to refresh the token once it's expired?

komposure commented Oct 22, 2015

Is there any way to refresh the token once it's expired?

@charliewolf

This comment has been minimized.

Show comment
Hide comment
@charliewolf

charliewolf Oct 22, 2015

Owner

Do the same thing again would be one way.
@JoelOtter had a a way to get a longer lasting token here

Owner

charliewolf commented Oct 22, 2015

Do the same thing again would be one way.
@JoelOtter had a a way to get a longer lasting token here

@komposure komposure closed this Oct 26, 2015

@komposure

This comment has been minimized.

Show comment
Hide comment
@komposure

komposure Oct 26, 2015

Perfect, the token works for much longer than 2 hours now - 60 days is how long the aforementioned post suggests. This is long enough to suitably be updated manually. Thanks for all your help!

komposure commented Oct 26, 2015

Perfect, the token works for much longer than 2 hours now - 60 days is how long the aforementioned post suggests. This is long enough to suitably be updated manually. Thanks for all your help!

@afeezaziz

This comment has been minimized.

Show comment
Hide comment
@afeezaziz

afeezaziz Nov 27, 2015

Managed to get extended token, used facepy to get FB id but after that still couldn't authenticate.

graph = facepy.GraphAPI(user.access_token)
fb_user_id = graph.get('me')['id']
print fb_user_id


session = pynder.Session(str(fb_user_id), str(user.access_token))
potential_matches = session._api.recs()['results']
print potential_matches

I also tried with and without the str.

afeezaziz commented Nov 27, 2015

Managed to get extended token, used facepy to get FB id but after that still couldn't authenticate.

graph = facepy.GraphAPI(user.access_token)
fb_user_id = graph.get('me')['id']
print fb_user_id


session = pynder.Session(str(fb_user_id), str(user.access_token))
potential_matches = session._api.recs()['results']
print potential_matches

I also tried with and without the str.

@afeezaziz

This comment has been minimized.

Show comment
Hide comment
@afeezaziz

afeezaziz Nov 27, 2015

Sorry my fault, you can get extended access token if we have Tinder's secret et cetera. Following DJ Khaled's advice now. 👍

afeezaziz commented Nov 27, 2015

Sorry my fault, you can get extended access token if we have Tinder's secret et cetera. Following DJ Khaled's advice now. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment