'facebook_token': facebook_token, 'facebook_id': os.environ['FACEBOOK_ID'] } tinder = tinder.tinderClient(fbToken) # Max out your distance to maximize how many people you can like. settings = {'distance_filter': 100} tinder.post_profile(settings) count = 0 # TODO: error handle when your auth token expires. while True: try: # Keep getting recs, over and over call = tinder.get_recs() # You've run out of potential matches if this branch is taken. if 'results' not in call: print_result(count) exit(0) recs = call['results'] for rec in recs: name = rec['name'] _id = rec['_id'] tinder.get_like(_id) print 'Liked ' + name + '!' count += 1 except KeyboardInterrupt: print_result(count) exit(0)
if args.action == 'ping': fbToken = args.token tinder = tinder.tinderClient(fbToken) print json.dumps(tinder.post_ping()) if args.action == 'location': fbToken = args.token tinder = tinder.tinderClient(fbToken) data = json.loads(args.data) print json.dumps(tinder.updateLocation(data['lat'], data['lon'])) if args.action == 'like': fbToken = args.token tinder = tinder.tinderClient(fbToken) data = json.loads(args.data) print json.dumps(tinder.get_like(data['uid'])) if args.action == 'pass': fbToken = args.token tinder = tinder.tinderClient(fbToken) data = json.loads(args.data) print json.dumps(tinder.get_pass(data['uid'])) if args.action == 'user': fbToken = args.token tinder = tinder.tinderClient(fbToken) data = json.loads(args.data) print json.dumps(tinder.get_user(data['uid'])) if args.action == 'token': fbToken = args.token