├── .gitignore ├── LICENSE ├── README.md ├── _config.yml └── tinderonline.go /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Diego Siqueira 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **UPDATE(2017-04-02):** No longer working, Tinder fixed the last ping date in their API. 2 | 3 | # ![TinderOnline](http://image.prntscr.com/image/9d2b8e726a944215be4338849ea9c0cd.png) 4 | 5 | # TinderOnline ![Language Badge](https://img.shields.io/badge/Language-Go-blue.svg) ![Go Report](https://goreportcard.com/badge/github.com/DiSiqueira/TinderOnline) ![License Badge](https://img.shields.io/badge/License-MIT-blue.svg) ![Status Badge](https://img.shields.io/badge/Status-Beta-brightgreen.svg) 6 | 7 | TinderOnline is a Go program made on the top of Tinder API. 8 | 9 | The TinderOnline's goal is to be a perfect tool providing a stupidly easy-to-use and fast program to find out when was the last time your friends used the Tinder App. It uses your Facebook Token to autenticate and find your friends, then show to you how much time passed since their last use. 10 | 11 | ## Project Status 12 | 13 | TinderOnline is on beta. Pull Requests [are welcome](https://github.com/DiSiqueira/TinderOnline#social-coding) 14 | 15 | ![](https://i.imgur.com/W7JSwzA.jpg) 16 | 17 | ## Features 18 | 19 | - Open source - You can check out our code 20 | - Secure 21 | - Only one parameter 22 | - 100% satisfaction guaranteed 23 | - It's perfect to find out if your girlfriend or boyfriend are using Tinder 24 | - Instantly see who are online now 25 | - STUPIDLY [EASY TO USE](https://github.com/DiSiqueira/TinderOnline#usage) 26 | - Very fast start up and response time 27 | - Uses native libs 28 | 29 | ## Installation 30 | 31 | ### Option 1: Go Get 32 | 33 | ```bash 34 | $ go get github.com/disiqueira/tinderonline 35 | $ tinderonline -h 36 | ``` 37 | 38 | Make sure that `$GOPATH\bin` is in your PATH, if it is not add it by doing `export PATH=$PATH:$GOPATH/bin` 39 | 40 | ### Option 2: From source 41 | 42 | ```bash 43 | $ git clone https://github.com/disiqueira/tinderonline.git tinderonline 44 | $ cd tinderonline/ 45 | $ go get -v -d 46 | $ go build *.go 47 | ``` 48 | 49 | ## Usage 50 | 51 | ### Show Help 52 | 53 | ```bash 54 | # Show help 55 | $ tinderonline -h 56 | ``` 57 | 58 | ### Show your friends 59 | 60 | ```bash 61 | # Show your friends that use Tinder, and who much time since their last usage 62 | $ tinderonline -token=YOURFACEBOOKTOKENHERE 63 | ``` 64 | 65 | ## How to get your Facebook Token 66 | 67 | 1. Open [This link](https://www.facebook.com/v2.6/dialog/oauth?redirect_uri=fb464891386855067%3A%2F%2Fauthorize%2F&scope=user_birthday,user_photos,user_education_history,email,user_relationship_details,user_friends,user_work_history,user_likes&response_type=token%2Csigned_request&client_id=464891386855067) 68 | 69 | 2. You will see a dialog that says you have already authorized Tinder. At this point, open your browser’s developer tools. (Cmd + Option + I on Mac) or (F12, Ctrl + Shift + I on Windows) or right click the page anywhere and select 'Inspect'. Switch to the 'Network' tab in your developer tools window. Your dev tools window should look like the image below. 70 | ![](https://tinderface.herokuapp.com/fb-auth-window.png) 71 | 72 | 3. Press the 'Okay' button on the Tinder dialog, and you will see some activity in the Network tab. In the Network tab, locate the new 'confirm?dpr=2' entry, and right click it. Select the 'Copy Response' option from the context menu like in the image below. 73 | ![](https://tinderface.herokuapp.com/dev-tools-window.png) 74 | 75 | 4. After copying the response, paste it into some notepad and remove everything before the `&access_token=` and everything after the `&expires_in=`, you will get only the Facebook Token, it should looks like it: 76 | 77 | EAATm0PX4ZCpsAAG1dVq03YCE7BZB58ejN1MvkZAV6NFlJg4BKjhYZAz1G38b9CQfZCbzZCfEXkgkCkGkP1SEARXr3F1uQKjDSZA9RVd0LFt9ZBZDFh3mWo370IayhPIsVi7xJC4SvLEu99mxIHyG2VG07c5EyUI9MGLGC2sGTccHvdw3h6FTZAu6KCv 78 | 79 | 5. This is the value you should pass when calling the TinderOnline 80 | 81 | ## Program Help 82 | 83 | ![](http://image.prntscr.com/image/3a12514f944b48078863961920a7da18.png) 84 | 85 | ## Contributing 86 | 87 | ### Bug Reports & Feature Requests 88 | 89 | Please use the [issue tracker](https://github.com/DiSiqueira/TinderOnline/issues) to report any bugs or file feature requests. 90 | 91 | ### Developing 92 | 93 | PRs are welcome. To begin developing, do this: 94 | 95 | ```bash 96 | $ git clone https://github.com/disiqueira/tinderonline.git tinderonline 97 | $ cd tinderonline/ 98 | $ go get -v -d 99 | $ go run tinderonline.go 100 | ``` 101 | 102 | ## Social Coding 103 | 104 | 1. Create an issue to discuss about your idea 105 | 2. [Fork it] (https://github.com/DiSiqueira/TinderOnline/fork) 106 | 3. Create your feature branch (`git checkout -b my-new-feature`) 107 | 4. Commit your changes (`git commit -am 'Add some feature'`) 108 | 5. Push to the branch (`git push origin my-new-feature`) 109 | 6. Create a new Pull Request 110 | 7. Profit! :white_check_mark: 111 | 112 | ## License 113 | 114 | The MIT License (MIT) 115 | 116 | Copyright (c) 2013-2017 Diego Siqueira 117 | 118 | Permission is hereby granted, free of charge, to any person obtaining a copy 119 | of this software and associated documentation files (the "Software"), to deal 120 | in the Software without restriction, including without limitation the rights 121 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 122 | copies of the Software, and to permit persons to whom the Software is 123 | furnished to do so, subject to the following conditions: 124 | 125 | The above copyright notice and this permission notice shall be included in 126 | all copies or substantial portions of the Software. 127 | 128 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 129 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 130 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 131 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 132 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 133 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 134 | THE SOFTWARE. 135 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-merlot -------------------------------------------------------------------------------- /tinderonline.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | "time" 8 | 9 | "github.com/disiqueira/tindergo" 10 | ) 11 | 12 | func main() { 13 | token := flag.String("token", "", "Your Facebook Token.") 14 | 15 | flag.Parse() 16 | 17 | if *token == "" { 18 | fmt.Println("You must provide a valid Facebook Token.") 19 | os.Exit(2) 20 | } 21 | 22 | t := tindergo.New() 23 | 24 | err := t.Authenticate(*token) 25 | checkError(err) 26 | 27 | profile, err := t.Profile() 28 | checkError(err) 29 | 30 | fmt.Println("Your Profile:") 31 | fmt.Println("Name: " + profile.Name) 32 | fmt.Println("") 33 | 34 | friends, err := t.Friends() 35 | now := time.Now() 36 | 37 | fmt.Printf("|%40s|%70s|\n", "Your Friend", "Last Time Online") 38 | fmt.Printf("|%40s|%70s|\n", "", "") 39 | for _, e := range friends { 40 | user, err := t.User(e.UserID) 41 | checkError(err) 42 | fmt.Printf("|%40s|%70s|\n", e.Name, diffForHumans(user.PingTime, now)) 43 | } 44 | } 45 | 46 | func diffForHumans(a, b time.Time) string { 47 | year, month, day, hour, min, sec := diff(a, b) 48 | s := "" 49 | p := false 50 | 51 | if year > 0 { 52 | s += fmt.Sprintf("%02d", year) + " year(s) " 53 | p = true 54 | } 55 | 56 | if month > 0 || p { 57 | s += fmt.Sprintf("%02d", month) + " month(s) " 58 | p = true 59 | } 60 | 61 | if day > 0 || p { 62 | s += fmt.Sprintf("%02d", day) + " day(s) " 63 | p = true 64 | } 65 | 66 | if hour > 0 || p { 67 | s += fmt.Sprintf("%02d", hour) + " hour(s) " 68 | p = true 69 | } 70 | 71 | if min > 0 || p { 72 | s += fmt.Sprintf("%02d", min) + " min(s) " 73 | p = true 74 | } 75 | 76 | if !p { 77 | return "ONLINE NOW!!!" 78 | } 79 | 80 | if sec > 0 || p { 81 | s += fmt.Sprintf("%02d", sec) + " sec(s) " 82 | p = true 83 | } 84 | 85 | return s + "ago" 86 | } 87 | 88 | func diff(a, b time.Time) (year, month, day, hour, min, sec int) { 89 | if a.Location() != b.Location() { 90 | b = b.In(a.Location()) 91 | } 92 | if a.After(b) { 93 | a, b = b, a 94 | } 95 | y1, M1, d1 := a.Date() 96 | y2, M2, d2 := b.Date() 97 | 98 | h1, m1, s1 := a.Clock() 99 | h2, m2, s2 := b.Clock() 100 | 101 | year = int(y2 - y1) 102 | month = int(M2 - M1) 103 | day = int(d2 - d1) 104 | hour = int(h2 - h1) 105 | min = int(m2 - m1) 106 | sec = int(s2 - s1) 107 | 108 | // Normalize negative values 109 | if sec < 0 { 110 | sec += 60 111 | min-- 112 | } 113 | if min < 0 { 114 | min += 60 115 | hour-- 116 | } 117 | if hour < 0 { 118 | hour += 24 119 | day-- 120 | } 121 | if day < 0 { 122 | // days in month: 123 | t := time.Date(y1, M1, 32, 0, 0, 0, 0, time.UTC) 124 | day += 32 - t.Day() 125 | month-- 126 | } 127 | if month < 0 { 128 | month += 12 129 | year-- 130 | } 131 | 132 | return 133 | } 134 | 135 | func checkError(err error) { 136 | if err != nil { 137 | panic(err) 138 | } 139 | } 140 | --------------------------------------------------------------------------------