Conversation
|
travis-ci is throwing a request code 401 (unauthorized login). Could it be possible that the token used in test.ini is no longer valid? Anyone care to test if this works for you? |
|
Thanks for your work @cjekel I'll try it out! |
|
@cjekel I wanted to try but it seems that facebook changed its API a bit too much and old ways of getting the token are not working. For example, I tried https://gist.github.com/taseppa/66fc7239c66ef285ecb28b400b556938 and #171 (comment) and https://gist.github.com/rtt/10403467#authenticating . None of those methods are working to get the token. |
|
If this works https://github.com/fbessez/Tinder/blob/master/phone_auth_token.py then your facebook_token should be this line otherwise that script outputs your X-Auth-Token for pynder... The MITM methods are a bit trickier to set up. |
|
Thanks @cjekel I'll try it right now. |
|
I tried with https://github.com/fbessez/Tinder/blob/master/phone_auth_token.py by printing the access_token . I get a string which is 112 chars long. I tried the following code: import requests
facebook_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
print(len(facebook_token))
USER_AGENT = "Tinder/7.5.3 (iPhone; iOS 10.3.2; Scale/2.00)"
HEADERS = {
'app_version': '6.9.4',
'platform': 'ios',
"content-type": "application/json",
"User-agent": USER_AGENT,
"Accept": "application/json"
}
new_url = 'https://api.gotinder.com/v2/auth/login/facebook'
new_data = {"token": facebook_token}
r_new = requests.post(new_url, headers=HEADERS, json=new_data)
print(r_new.status_code)
print(r_new.json())And I got: Do you think that the facebook token is wrong? I also got the tinder token which is in this form: |
Yes it looks like the facebook token is wrong unfortunately.
Yes, and this is the good news. That should be the X-Auth-Token, which you can use to log into pynder. I'll need to rework tindetheus to use X-Auth-Token, but you can test something like this. import pynder
X_Auth_Token = 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx'
session = pynder.Session(XAuthToken=X_Auth_Token)
print(session.profile) |
|
I tried your code (with your branch, cjekel:v2auth_newhead) and my tinder name appeared. I supposed it's good news then :) |
|
@cjekel |
|
@ryan713 I'm not sure what's going on then. How are you using this pynder version? with facebook_token or XAuthToken when you create the Session? This PR of pynder is working for me right now with facebook_token. To install this PR git clone https://github.com/charliewolf/pynder.git
cd pynder
git fetch origin +refs/pull/211/merge
git checkout -qf FETCH_HEAD
python -m pip install --force-reinstall --no-deps . |
|
@cjekel I got it working with FB_token. Thanks. |
|
Everything works on my computer, I used https://github.com/fbessez/Tinder/blob/master/phone_auth_token.py to get my token. |
|
i am able to connect with my fb id and token, however when i run: i get an error on the last line: TypeError: 'generator' object is not subscriptable |
|
@fjleon1980 see #127 , but you need to use a loop or manually iterate through the generator with |
|
@simpleistruth
How long is this token valid ? I'm using Facebook tokens generated by hand for now, but they are only valid for one hour :s Maybe the sms generated tokens are valid longer ? Thanks |
my tokens have also lasted about a hr. |
|
It appears this fix works on Python 3.X, but not on Python 2.7. Does anyone know why that may be? EDIT: OOOPS! This PR is indeed working on Python 2.7. |
@fjleon1980 can you explain how to get FB token and id, I followed #171(comment) and got a 198 characters long FB token and numeric id. When I tried running I have all the packages upgraded but still no luck. :/ |
Fixes facebook authentication for new v2 api.
Changes:
api._requsts. Wasdata={}, now isdata=None(This was causing 403)0.0.14; because why notTest are passing on my computer...
Closes:
#208