Giter Site home page Giter Site logo

jstinder's Introduction

jstinder

A tinder API client that uses fetch and works in nodewebkit, electron, nodejs & react-native.

usage

If you are using ES6 in electron/nwjs, it would look like this:

import tinder from 'jstinder'

tinder.login()
  .then((me) => {
    // `me` is facebook profile for you
    return tinder.auth(me.token, me.id)
      .then(tinder.recommendations)
      .then((recommendations) => {
        // handle recommendations
      })
  })
  .catch(err) => {
    // handle err here
  })

If you are using ES5 in electron/nwjs, it would look like this:

var tinder = require('jstinder')

tinder.login()
  .then(function (me) {
    return tinder.auth(me.token, me.id)
      .then(tinder.recommendations)
      .then(function (recommendations) {
        // handle recommendations
      })
  })
  .catch(function (err) {
    // handle err here
  })

You can see more demos in the demos/ dir.

api

All of these return a Promise.

tinder.auth(fbtoken, fbid)

authenticate tinder client with facebook auth token & id

tinder.login()

login with facebook, opens a new window (requires browser window like nodewebkit or atom that can watch for changes on child window)

tinder.recommendations()

get recommendations from tinder

tinder.message(userid, messsage)

send a tinder message

tinder.pass(userid)

swipe left

tinder.like(userid)

swipe right

tinder.history()

Gets the entire history for the user (all matches, messages, blocks, etc.)

tinder.position(lon, lat)

Updates the position for this user

tinder.user(userid)

Get user by id

credit

I got a lot of ideas from tinderjs

jstinder's People

Contributors

konsumer avatar

Stargazers

 avatar

Watchers

 avatar

jstinder's Issues

tinder changed facebook redirect_uri

For login to work, I need to get a tinder-authorized facebook token. I am currently using this:

https://www.facebook.com/dialog/oauth?client_id=464891386855067&redirect_uri=https://www.facebook.com/connect/login_success.html

The redirect_uri no longer works, so I need to monitor network traffic.

screen shot 2016-08-19 at 12 55 10 pm

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.