GithubHelp home page GithubHelp logo

hesaul / tinder_pro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tranhungt/tinder_pro

0.0 2.0 0.0 209 KB

Want to be pro at Tinder? Here's the Nodejs API wrapper to make it so.

License: MIT License

tinder_pro's Introduction

Tinder Pro

A wrapper for the Tinder API

Installation

via npm

npm install tinder_pro

via git

git clone https://github.com/tranhungt/tinder_pro.git

Getting the Facebook OAUTH Tokens

In order to use the API, you will need the facebook oauth token. To get the facebook oauth token, it's best to use a proxy service such as Charles Proxy. You can set up Charles Proxy by following a simple walkthrough here:

http://hungtran.co/discovering-tinders-private-api/

After setting up the proxy, initiate the tinder app on your phone, and you will see the http request to https://api.gotinder.com/auth. Check the request json body, and you will see something like

{
  "facebook_token": "CAAGm0PX4ZCps............",

  "facebook_id": "761..."
}

Usage

###Authenticating With the facebook auth token, you can plug it into the app's auth.

var FACEBOOK_ID = "761..."

var FACEBOOK_TOKEN = "BAAGm0PX4ZCps............"

var TinderPro = require('tinder_pro')
var tinder = new TinderPro()

tinder.sign_in(FACEBOOK_ID, FACEBOOK_TOKEN, function(err, res, body){})

Every function is an asynchronous request to Tinder's API, therefore takes a callback with the params callback(err, res, body) that reflects the API's response.

###Interacting with Users

.get_nearby_users(callback)
```

Returns an array of json user objects.

```
.like(user_id, callback)
```

Likes a user, equivalent of swiping right.


```
.dislike(user_id, callback)
```

Passes on the user.

```
.send_message(user_id, message, callback)
```

Sends a message to the user. You can only do this to users whom you've been matched with.
Generally used after you call `.like` and the response body.match is true.

```
.fetch_updates(callback)
```
Gets updates from your last visit, ie. messages, likes, blocks.


###Updating preferences
```
.update_search_distance(distance, callback)
```

Takes an integer distance in miles and updates your search distance preference.

```
.update_location(latitude, longitude, callback)
```

Updates your current position. Latitude and longitude are float precision.


Credits
-------
Copyright © 2014 Hung Tran

Released under the MIT License, which can be found in the repository in `LICENSE.txt`.

tinder_pro's People

Contributors

tranhungt avatar craftfortress avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.