Giter Club home page Giter Club logo

tinder-api's Introduction

A Java implementation of tinder's HTTP API

Build Status

A minimal and handy java sdk for tinder's HTTP API

Getting started

You can use maven to install the package. Add this to your pom.xml file

<dependency>
  <groupId>com.github.0x13a</groupId>
  <artifactId>tinder-api</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>

Quick guide

This is an example on how you want to use it. First you need to retrieve your Facebook access token for the tinder app. Then you are ready to start.

Getting profile information

import com.djm.tinder.*;

public class App {
    public static void main(String[] args) {
        try {
            final Tinder tinder = Tinder.fromAccessToken("AFD4C0jKqYf1y1NWeJzaZ8Vv0r4kNaXD");
            Profile profile = tinder.getProfile();
            System.out.println(String.format("About me: %s", profile.getName()));
        } catch (AuthenticationException e) {
            System.out.println("Whoops, unable to authenticate to the tinder API. Check your Facebook access token / app's permissions.");
        }
    }
}

Retrieve list of recommendations

import com.djm.tinder.*;

public class App {
    public static void main(String[] args) {
        try {
            final Tinder tinder = Tinder.fromAccessToken("AFD4C0jKqYf1y1NWeJzaZ8Vv0r4kNaXD");
            final ArrayList<User> users = tinder.getRecommendations();
            for (User user : users) {
                System.out.println(String.format("See %s", user.getName()));
            }
        } catch (AuthenticationException e) {
            System.out.println("Whoops, unable to authenticate to the tinder API. Check your Facebook access token / app's permissions.");
        }
    }
}

Like user

import com.djm.tinder.*;

public class App {
    public static void main(String[] args) {
        try {
            final Tinder tinder = Tinder.fromAccessToken("AFD4C0jKqYf1y1NWeJzaZ8Vv0r4kNaXD");
            final ArrayList<User> users = tinder.getRecommendations();
            Like like = tinder.like(users.get(0));
            if (like.isMatch() == true) {
                System.out.println(String.format("Matched with %s!", user.getName()));
            }
        } catch (AuthenticationException e) {
            System.out.println("Whoops, unable to authenticate to the tinder API. Check your Facebook access token / app's permissions.");
        }
    }
}

Many more to come. Check the api doc for more.

Get your Facebook Access Token

In order to work, the Tinder java client (even your tinder app) needs an access token. This access Token is gonna be used in each call to the Tinder api. To obtain the Tinder access token we have to call the https://gotinder.com/v2/auth endpoint where you need to provide your facebook access token granted to the Tinder app. This will allow tinder to access your facebook info (name, pics, email, friends, likes).

The Facebook Access Token is the only thing you need to get started. If you are smart enough, you can find it here Facebook's Tinder App permission

Documentation

You can check javadoc here https://0x13a.github.io/tinder-api/

License

This software is licenced under the Beerware License. For more insights, please check LICENSE file

tinder-api's People

Contributors

zalintyre avatar

Watchers

 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.