Building a Tinder Bot in Python

**UPDATE 11-19-17**

I have included a function for automating the process of getting an auth token for the Tinder bot to work (Tinder Token Retriever). Shout out to the developer! To see a post of the code, view this post: Automatic Tinder Authentication Token Retriever in Python. The update has been included in the code file that is linked below. Due to this update, the manual process  that is described below for obtaining an auth token is no longer needed. I keep it included in the blog post, however, for reference in case the automated code ever stops working.

BEGINNING OF ORIGINAL POST:

It’s 2016 and online dating appears to be here to stay. One of the more popular online dating apps is Tinder, the bane of my existence. You line up date after date, going through the same ole song and dance each time, asking and answering the same questions, having the same conversations, to the point that it feels robotic. It’s a game of numbers, bulk dating, spray and pray, and it all just seems so shallow. So what does a nerd trying to simultaneously learn Python and dating do? He makes it even more shallow by building an actual bot!

A tinder bot can automatically swipe right for you and even send automated messages if you really want to get fancy. However, I should warn you with the typical disclaimer. Any attempts to spam or harass anyone through the use of a bot are not condoned  by myself or Tinder. It could lead to Tinder shutting down your account or worse. What you can do is minimize the amount of work needed to play the dating field, increase your chances of getting matches by auto-swiping, and use data to optimize your swipes, messages, and dates. This post is only for educational purposes. Now let’s get started.

You’ll only need two (plus a third optional) things to build a Tinder bot:

  1. Facebook+Tinder authentication
  2. Burp (https://portswigger.net/burp/download.html) (optional)
  3. Python with Pynder installed

(NOTE: THIS NEXT SECTION IS NOT REQUIRED, GIVEN THAT I HAVE INCLUDED A FUNCTION FOR AUTOMATING GETTING AN AUTHENTICATION TOKEN (Tinder Token Retriever) IN THE LATEST VERSION OF THE BOT POSTED BELOW.)

First, to set up authentication, use your desktop web browser (I would recommend Chrome) to go to the Facebook profile that will be used with Tinder. Right click the Facebook profile web page and select “View Page Source”.  Then, command+f (or ctrl+f for Windows users) to find “profile_id” in the source code. Save the value listed for the profile_id. This will be used as the FACEBOOK_ID for authentication.

Now,  if you have already signed into Tinder through this Facebook profile, then you’ll need to go to the Facebook Settings and select the Apps settings tab. Then, remove Tinder from the Apps logged in with Facebook. Once you’ve removed Tinder, on that same browser tab, right click and select “Inspect”. Then in the browser URL bar, paste this URL: https://www.facebook.com/dialog/oauth?client_id=464891386855067&redirect_uri=fbconnect://success&scope=basic_info%2Cemail%2Cpublic_profile%2Cuser_about_me%2Cuser_activities%2Cuser_birthday%2Cuser_education_history%2Cuser_friends%2Cuser_interests%2Cuser_likes%2Cuser_location%2Cuser_photos%2Cuser_relationship_details&response_type=token&__mref=message.  Click “Continue” when prompted. Now, go back to the “Inspect” window and we’re going to look for the authentication token. Go to the “Network” tab. Select “XHR” for the filter. Then look for one named something like “read?dpr=2”.  If you click on it, you should see some stuff in the “Preview” window. Click the arrow next to “jsmods” in the “Preview” window. Keep clicking through the nested arrows (“require”, “0”) until you see a final arrow (possibly next to a number like “3”). Click this final nested arrow and there should be a url like “fbconnect://success#access_token=” with a token behind it. Save that token. It will be used as the FACEBOOK_AUTH_TOKEN for your bot.

(OPTIONAL) Second, you’ll can install Burp on your desktop/laptop. Burp is a tool used to intercept requests and responses through a proxy, acting like a middle man, allowing you to see how a website or app is operating under the hood. Once you have Burp installed on your desktop/laptop, you’ll need to configure it so that traffic from your phone is piped through a proxy set up in Burp. Burp has plenty of good documentation on how to set this up:

Once you’ve configured your mobile device to run through Burp’s proxy, there are just a few other options you’ll want to set up. In the Proxy tab under Options, make sure all the boxes are checked for Intercept Client Requests and Intercept Server Responses. This will ensure everything needed to build the Tinder bot is intercepted.

Now you’re ready to start seeing how Tinder requests and responses are formatted. With “Intercept” turned on in Burp on your desktop, open Tinder on your mobile device. You should see information populate in Burp. If you want to explore the different requests and responses, you can hit the “Forward” button to allow the actions to go through as you use Tinder. You can use Burp to reverse engineer virtually any API, including Tinder’s. So, should Tinder ever make any changes to their API, or should the way they authenticate to Facebook change, you can always come back to Burp as a tool for helping determine what changed and how to adjust.

Using Burp is not required for this Tinder bot to work, but it is a tool that will prove forever useful if you want to explore adjusting your bot or building other bots. For the purposes of the next steps, you can keep Burp turned off and your web browser or mobile device running without any proxy. This will allows Tinder’s API requests/responses and your browser to work as normal.

Essentially, our Tinder bot will operate by authorizing itself, and then mimicking the Tinder API requests/responses through Python code. Luckily, there is a Python library called Pynder that makes setting this up easy, which brings us to our third step:

Assuming you already have Python and pip installed, you can install Pynder by simply opening your terminal and typing sudo pip install pynder. Now let’s get into the actual Python code.

The flow structure of our Tinder bot will go like this:

  1. Start a Tinder session by authorizing
  2. Check if we have reached our swipe limit
  3. If we are out of swipes, move along to send messages to the matches (steps 7+)
  4. Else, auto-swipe right (except randomly swipe left 1 time out of every 100 swipes to seem more human).
  5. Sleep between 1 and 5 seconds at random amounts in between each swipe (to seem more human).
  6. Continue swiping until out of swipes, then move along to send messages to the matches.
  7.  Grab the list of matches.
  8. For each match, grab the list of messages already in our inbox.
  9. If match isn’t already in our messages, send them the first message to start a conversation.
  10. If the number of messages already sent to the match is greater than or equal to the length of our list of messages to send, log the conversation is finished with that match.
  11. Else, if the latest message is from myself, log that there are no new messages from that match and move along to the next match.
  12. Else, if there is new message from someone and it contains the words “bot”, “fake”, or “real person”, then send the appropriate responding message (we have different message lists for each word to make the conversations somewhat dynamic).
  13. Else send the next generic message. Then move along to the next match.
  14. Do this for each match in the list of matches.
  15. Log resting for a few minutes and sleep a random amount between 300 and 600 seconds (to seem more human).
  16. Repeat.

**UPDATE 11-19-17** I HAVE UPLOADED A NEW VERSION OF THE TINDER BOT (BELOW) THAT INCLUDES A FUNCTION FOR AUTOMATING THE PROCESS OF GETTING AN AUTH TOKEN (Tinder Token Retriever).

Here is a .zip file of the code (I named my bot Tinderly):

Tinderly

You’ll notice the folder contains a config.ini file for the Facebook profile ID, email, and password and  Facebook auth token (which I detailed how to find manually earlier in this post). Insert your Facebook email, password, ID into this file. There are also separate Python files for the various dynamic conversations with lists of messages. You can change the conversations to your liking by editing what keywords you want to look for and changing the message lists for each keyword. And most importantly, there is a tinderly.py file that is the main bot script.

I’ll let you play around with the code yourself and won’t spend the time posting it all here, but there is one change I had to make to the Pynder library code to allow checking if you’ve run out of swipes.. My Pynder downloaded to Macintosh HD > Library > Python > 2.6 > site-packages > pynder. Once you can locate your local Pynder folder, open the api.py file in a text editor.  There is a function called “like”, I changed the function to be defined like this:

def like(self, user):
	return self._get("/like/{}".format(user))
	result = self._get("/like/{}".format(user))
	if 'likes_remaining' in result and result[0]:
		raise errors.RequestError("Swipe limit reached")
		return result

 

Once you’ve made this change, save the api.py file and your Tinder bot will be ready to run.

The last step for setting the bot up is to update the configuration file (config.ini) to use your Facebook email, password, and ID.

To run the bot (on Mac), open a Terminal window and “cd” navigate to the directory/folder where you have the Python scripts saved. Then simply run the command “python tinderly.py” (or whatever you named your Python script).

Thanks for checking out my ramblings and stay tuned for many more to come! Feel free to leave any comments or questions you may have about this project. In the meantime, good luck swiping and keep a Tinder heart.

– JPR

75 thoughts on “Building a Tinder Bot in Python

  1. Andrei says:

    Hi John,

    I do have a question. I have the App Id and App Secret from “developers.facebook”, but in pynder documentation are specified FB_id and FB_token. Can i use App Id and App Secret for authentification in config.py?

    Like

    • John Patrick Roach says:

      Correction here. You cannot use App ID and App Secret for authentication. You’ll need to get the profile id of the Facebook account used for Tinder, and you’ll need to get an auth token when you give Tinder permission to log in through Facebook. I will update this post with instructions on how to do these things.

      Like

    • John Patrick Roach says:

      Hi Joel,

      If you’re on a Mac, to run the bot, open a Terminal window and “cd” navigate to the directory/folder where you have the Python scripts saved. Then, simply run the command “python tinderly.py” (or whatever you named your Python script). Let me know if you have any other questions.

      -JPR

      Like

  2. Vytas says:

    Hi John,

    I’m slightly late to stumble upon this article and quite a noob, but I’d like to know if it’s possible to change the search distance, and also pull the current distance of your matches (update it once they change location)? I don’t need the exact location, just the distance. Thanks in advance.

    Vytas

    Like

  3. David Bernat says:

    I’m using the Facebook ID and Facebook Auth Token. Yet, during authentication, I am getting a bad handshake error. I have confirmed these tokens are correct. How do I debug?

    session = pynder.Session(facebook_id=config.FACEBOOK_ID, facebook_token=config.FACEBOOK_AUTH_TOKEN)

    Produces error:
    Traceback (most recent call last):
    File “/Users/astrorobotic/Library/Application Support/IntelliJIdea2016.3/python/helpers/pydev/pydevd.py”, line 1596, in
    globals = debugger.run(setup[‘file’], None, None, is_module)
    File “/Users/astrorobotic/Library/Application Support/IntelliJIdea2016.3/python/helpers/pydev/pydevd.py”, line 974, in run
    pydev_imports.execfile(file, globals, locals) # execute the script
    File “/Users/astrorobotic/Startups/GitHub/think.ai/tinder/ashleymadison/tinderly_api.py”, line 15, in
    session = pynder.Session(facebook_id=config.FACEBOOK_ID, facebook_token=config.FACEBOOK_AUTH_TOKEN)
    File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pynder/session.py”, line 18, in __init__
    self._api.auth(facebook_id, facebook_token)
    File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pynder/api.py”, line 23, in auth
    self._url(‘/auth’), json=data, proxies=self._proxies).json()
    File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py”, line 535, in post
    return self.request(‘POST’, url, data=data, json=json, **kwargs)
    File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py”, line 488, in request
    resp = self.send(prep, **send_kwargs)
    File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py”, line 609, in send
    r = adapter.send(request, **kwargs)
    File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/adapters.py”, line 497, in send
    raise SSLError(e, request=request)
    requests.exceptions.SSLError: (“bad handshake: SysCallError(54, ‘ECONNRESET’)”,)

    Like

  4. Jules says:

    Hi John,

    I am getting the following error. Any idea what is happening here?

    Traceback (most recent call last):
    File “tinderly.py”, line 11, in
    import pynder
    File “/usr/local/lib/python2.7/site-packages/pynder/__init__.py”, line 1, in
    from pynder.session import Session # NOQA
    File “/usr/local/lib/python2.7/site-packages/pynder/session.py”, line 4, in
    import pynder.api as api
    File “/usr/local/lib/python2.7/site-packages/pynder/api.py”, line 77
    raise errors.RequestError(“Swipe limit reached”)
    ^

    Also, for the Facebook Auth token, should you remove the ‘?expires_in’ from the end of the FACEBOOK_AUTH_TOKEN, or no?

    Thank you for taking the time to do this

    Jules

    Like

    • John Patrick Roach says:

      Looks like you are getting an error from the import of pynder on the swipe limit check in the api.py pynder file. Do you have the proper indentions in the api.py pynder edit that was made?
      Also, yes, you should remove the ‘?expires_in’ from the end of the FACEBOOK_AUTH_TOKEN.

      Like

  5. Art Mooney says:

    Thanks Roachie ,

    Less spam up all the apps with a bunch of amateur coders figuring out how to jerk off for the first time.

    Like

  6. Matt Namaru says:

    Hi, I’m getting the following error upon running:

    Traceback (most recent call last):
    File “tinderly.py”, line 139, in
    handle_likes()
    File “tinderly.py”, line 37, in handle_likes
    for u in users:
    File “/Library/Python/2.7/site-packages/pynder/session.py”, line 26, in nearby_users
    response = self._api.recs(limit)
    File “/Library/Python/2.7/site-packages/pynder/api.py”, line 62, in recs
    return self._post(“/user/recs”, data={“limit”: limit})
    File “/Library/Python/2.7/site-packages/pynder/api.py”, line 50, in _post
    return self._request(“post”, url, data=data)
    File “/Library/Python/2.7/site-packages/pynder/api.py”, line 41, in _request
    raise errors.RequestError(result.status_code)
    pynder.errors.RequestError: 401

    Any idea what the issue is here?

    Like

    • John Patrick Roach says:

      Are you sure you’re authenticated? Do you have the correct token? Has the authentication token expired? I’ve also seen that some people have deleted “config.FACEBOOK_ID” from session = pynder.Session(config.FACEBOOK_AUTH_TOKEN), and that seems to work for them.

      Like

  7. Dijkstra says:

    Hey John, great tutorial. Unfortunatly I’m getting the following error when running the command “python tinderly.py”. (I’m running on a raspberry pi with the raspian OS):

    Traceback (most recent call last):
    File “tinderly.py”, line 139, in
    handle_likes()
    File “tinderly.py”, line 37, in handle_likes
    for u in users:
    File “/usr/local/lib/python2.7/dist-packages/pynder/session.py”, line 26, in nearby_users
    response = self._api.recs(limit)
    File “/usr/local/lib/python2.7/dist-packages/pynder/api.py”, line 62, in recs
    return self._post(“/user/recs”, data={“limit”: limit})
    File “/usr/local/lib/python2.7/dist-packages/pynder/api.py”, line 50, in _post
    return self._request(“post”, url, data=data)
    File “/usr/local/lib/python2.7/dist-packages/pynder/api.py”, line 41, in _request
    raise errors.RequestError(result.status_code)
    pynder.errors.RequestError: 401

    I read your answer to Jules but I couldn’t figure out a solution. I checked if the liked() function in api.py was well edited, removed the ‘&expires_in=7193’ in the authentication key and checked if my facebook id was correct.

    Thanks

    Like

    • John Patrick Roach says:

      Are you sure you’re authenticated? Do you have the correct token? Has the authentication token expired? I’ve also seen that some people have deleted “config.FACEBOOK_ID” from session = pynder.Session(config.FACEBOOK_AUTH_TOKEN), and that seems to work for them.

      Like

    • John Patrick Roach says:

      Are you sure you’re authenticated? Do you have the correct token? Has the authentication token expired? I’ve also seen that some people have deleted “config.FACEBOOK_ID” from session = pynder.Session(config.FACEBOOK_AUTH_TOKEN), and that seems to work for them.

      Like

  8. Kasper Honoré says:

    Traceback (most recent call last):
    File “tinderly.py”, line 139, in
    handle_likes()
    File “tinderly.py”, line 37, in handle_likes
    for u in users:
    File “/usr/local/lib/python2.7/dist-packages/pynder/session.py”, line 26, in nearby_users
    response = self._api.recs(limit)
    File “/usr/local/lib/python2.7/dist-packages/pynder/api.py”, line 62, in recs
    return self._post(“/user/recs”, data={“limit”: limit})
    File “/usr/local/lib/python2.7/dist-packages/pynder/api.py”, line 50, in _post
    return self._request(“post”, url, data=data)
    File “/usr/local/lib/python2.7/dist-packages/pynder/api.py”, line 41, in _request
    raise errors.RequestError(result.status_code)
    pynder.errors.RequestError: 401

    what have i done wrong?

    Like

  9. jamesdos says:

    I’m getting this error…

    python tinderly.py
    Traceback (most recent call last):
    File “tinderly.py”, line 11, in
    import pynder
    File “/Library/Python/2.7/site-packages/pynder/__init__.py”, line 1, in
    from pynder.session import Session # NOQA
    File “/Library/Python/2.7/site-packages/pynder/session.py”, line 4, in
    import pynder.api as api
    File “/Library/Python/2.7/site-packages/pynder/api.py”, line 13, in
    class TinderAPI(object):
    File “/Library/Python/2.7/site-packages/pynder/api.py”, line 216, in TinderAPI
    def report(self, user, cause=constants.ReportCause.Other, text=””):
    AttributeError: ‘module’ object has no attribute ‘ReportCause’

    Any idea how to fix this?

    Like

      • jamesdos says:

        This is the code from api.py, which (I think) is what’s causing the issue:

        import requests

        import threading

        import pynder.constants as constants

        import pynder.errors as errors

        class TinderAPI(object):

        def __init__(self, XAuthToken=None, proxies=None):

        self._session = requests.Session()

        self._session.headers.update(constants.HEADERS)

        self._token = XAuthToken

        self._proxies = proxies

        if XAuthToken is not None:

        self._session.headers.update({“X-Auth-Token”: str(XAuthToken)})

        def _full_url(self, url):

        _url = url.lower()

        if _url.startswith(“http://”) or _url.startswith(“https://”):

        return url

        else:

        return constants.API_BASE + url

        def auth(self, facebook_id, facebook_token):

        data = {“facebook_id”: str(facebook_id), “facebook_token”: facebook_token}

        result = self._session.post(

        self._full_url(‘/auth’), json=data, proxies=self._proxies).json()

        if ‘token’ not in result:

        raise errors.RequestError(“Couldn’t authenticate”)

        self._token = result[‘token’]

        self._session.headers.update({“X-Auth-Token”: str(result[‘token’])})

        return result

        def _request(self, method, url, data={}):

        if not hasattr(self, ‘_token’):

        raise errors.InitializationError

        result = self._session.request(method, self._full_url(

        url), json=data, proxies=self._proxies)

        while result.status_code == 429:

        blocker = threading.Event()

        blocker.wait(0.01)

        result = self._session.request(method, self._full_url(

        url), data=data, proxies=self._proxies)

        if result.status_code = 300:

        raise errors.RequestError(result.status_code)

        if result.status_code == 201 or result.status_code == 204:

        return {}

        return result.json()

        def _get(self, url):

        return self._request(“get”, url)

        def _post(self, url, data={}):

        return self._request(“post”, url, data=data)

        def _delete(self, url):

        return self._request(“delete”, url)

        def updates(self, since):

        return self._post(“/updates”, {“last_activity_date”: since} if since else {})

        def meta(self):

        return self._get(“/meta”)

        def add_profile_photo(self, fbid, x_dist, y_dist, x_offset, y_offset):

        data = {

        “transmit”: “fb”,

        “assets”: [{“id”: str(fbid), “xdistance_percent”: float(x_dist), “ydistance_percent”: float(y_dist),

        “xoffset_percent”: float(x_offset), “yoffset_percent”: float(y_offset)}]

        }

        return self._request(“post”, constants.CONTENT_BASE + “/media”, data=data)

        def delete_profile_photo(self, photo_id):

        data = {“assets”: [photo_id]}

        return self._request(“delete”, constants.CONTENT_BASE + “/media”, data=data)

        def recs(self, limit=10):

        return self._post(“/user/recs”, data={“limit”: limit})

        def matches(self, since):

        return self.updates(since)[‘matches’]

        def profile(self):

        return self._get(“/profile”)

        def update_profile(self, profile):

        return self._post(“/profile”, profile)

        def like(self, user):
        return self._get(“/like/{}”.format(user))
        result = self._get(“/like/{}”.format(user))
        if ‘likes_remaining’ in result and result[0]:
        raise errors.RequestError(“Swipe limit reached”)
        return result

        def dislike(self, user):

        return self._get(“/pass/{}”.format(user))

        def message(self, user, body):

        return self._post(“/user/matches/{}”.format(user),

        {“message”: str(body)})

        def message_gif(self, user, giphy_id):

        return self._post(“/user/matches/{}”.format(user),

        {“type”: “gif”, “gif_id”: str(giphy_id)})

        def report(self, user, cause=constants.ReportCause.Other, text=””):

        try:

        cause = int(cause)

        except TypeError:

        cause = int(cause.value)

        data = {“cause”: cause}

        if text and constants.ReportCause(cause) == constants.ReportCause.Other:

        data[“text”] = text

        return self._post(“/report/” + user, data)

        def user_info(self, user_id):

        return self._get(“/user/” + user_id)

        def ping(self, lat, lon):

        return self._post(“/user/ping”, {“lat”: lat, “lon”: lon})

        def share(self, user):

        return self._post(“/user/{}/share”.format(user))

        def superlike(self, user):

        result = self._post(“/like/{}/super”.format(user))

        if ‘limit_exceeded’ in result and result[‘limit_exceeded’]:

        raise errors.RequestError(“Superlike limit exceeded”)

        return result

        def fb_friends(self):

        “””

        Requests records of all facebook friends using Tinder Social.

        :return: object containing array of all friends who use Tinder Social.

        “””

        return self._get(“/group/friends”)

        def like_message(self, message):

        “””

        Hearts a message sent by a match

        :param message: message id

        :return: empty json, response code is 201 (Created)

        “””

        return self._post(“/message/{}/like”.format(message.id))

        def unlike_message(self, message):

        “””

        Removes heart from a message

        :param message: message id

        :return: empty json, response code is 204 (No content)

        “””

        return self._delete(“/message/{}/like”.format(message.id))

        def liked_messages(self, since):

        return self.updates(since)[‘liked_messages’]

        Like

      • John Patrick Roach says:

        Looks like your api.py is different from mine. How did you install pynder? Among other difference, my version of api.py says this:

        def report(self, user, cause=1):
        return self._post("/report/" + user, {"cause": cause})

        Like

  10. Emerson says:

    Hey thanks for the post… everything seems to work fine for but ‘Out of swipes. Moving along to send messages.’ never actually sends a message.

    Any idea for fixing this?

    Like

  11. Getafix says:

    I get this error. The auth token is new, within seconds of actually obtaining it. Tried redoing it a couple of times, same problem.
    FACEBOOK_AUTH_TOKEN = EAAGm0PX4ZCpsBABaUbTLBhNXHftqHVen2wxd9iNq8rVsPLVzlHyNm0WGzSG46Igf6ZCRqDB9pJ1eAzoxDUd9KuBmJxBx7wMiyGeEPsp9OCUDG1c1PJ6BNKhfhuVZCOuuDNd6u4wZCRRHhKAwCnHTeUuuGXU8ZAmptElBhRPgvl8QynZBqJXpN92NHGrIT7qeZBx0FrGTSREnwZDZD
    NameError: name ‘EAAGm0PX4ZCpsBABaUbTLBhNXHftqHVen2wxd9iNq8rVsPLVzlHyNm0WGzSG46Igf6ZCRqDB9pJ1eAzoxDUd9KuBmJxBx7wMiyGeEPsp9OCUDG1c1PJ6BNKhfhuVZCOuuDNd6u4wZCRRHhKAwCnHTeUuuGXU8ZAmptElBhRPgvl8QynZBqJXpN92NHGrIT7qeZBx0FrG’ is not defined

    Like

    • John Patrick Roach says:

      The Facebook ID and auth token need to be wrapped in single quotes. Ex: FACEBOOK_AUTH_TOKEN = ‘EAAGm0PX4ZCpsBABaUbTLBhNXHftqHVen2wxd9iNq8rVsPLVzlHyNm0WGzSG46Igf6ZCRqDB9pJ1eAzoxDUd9KuBmJxBx7wMiyGeEPsp9OCUDG1c1PJ6BNKhfhuVZCOuuDNd6u4wZCRRHhKAwCnHTeUuuGXU8ZAmptElBhRPgvl8QynZBqJXpN92NHGrIT7qeZBx0FrGTSREnwZDZD’

      Like

  12. Will says:

    Hi John,

    I commented earlier, but in a chain, so thought I would put a top level one. Sorry for the 2 posts.

    At the start I was having an issue with printing the date string, but just decided to comment it out and move on. I also couldnt get the auto get of the facebook auth to work, so commented the entire thing out (as well as the import robobrowser)

    Ive managed to fix a few tab/space issues, but have now hit a wall of:

    File “C:\Users\Will\AppData\Local\Programs\Python\Python36\lib\configparser.py”, line 1233, in __getitem__
    raise KeyError(key)
    KeyError: ‘FACEBOOK_AUTH_TOKEN’

    I have tried replaced the FACEBOOK_AUTH_TOKEN with my actual key in the tinderly.py but to no avail.

    Any ideas?

    Thanks!

    Will

    Like

      • Will says:

        I got the token using the manual process. I saw in an earlier comment about the expiry, so grabbed a new one (its about 30 min old).

        I updated the config file to read:

        facebook_auth_token = EAAGm0***ZDZD&expires_in=4339

        where *** is the rest of the token (no idea how sensitive that is so I blanked some out for anonymity). I assume that means it expires in 4339 seconds, so should be will in use still.

        Thanks for the speedy reply!

        Like

      • Will says:

        As im sure you’ve noticed Python is not my forte….so I really appreciate your help.

        I clean installed 2.7, went through the generic pip install pynder process, and downloaded tinderly to my scripts folder. I still had to comment out the whole robobrowser section, but that aside….

        I am having an issue with configparser which I simply do not understand.

        C:\Python27>python scripts/tinderly/tinderly.py

        Traceback (most recent call last):
        File “scripts/tinderly/tinderly.py”, line 42, in
        config = configparser.ConfigParser(interpolation=None)
        TypeError: __init__() got an unexpected keyword argument ‘interpolation’

        Its this section of code causing the issue:
        print(configparser)
        config = configparser.ConfigParser(interpolation=None)
        config.read(‘config.ini’)

        Ive peeled through Google to no avail. This is especially odd becuase I did not have this problem using python3.

        Any idea?

        Like

      • John Patrick Roach says:

        Hi Will,
        You’ll need to pip install robobrowser for it to work also. For the configparser error, have you confirmed that configparser is installed? You could try pip installing it also. Or, try removing the interpolation=None and seeing what that does. Hope that helps!

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s