Skip to content

Commit ec8894d

Browse files
authored
Merge pull request #16 from skipperbent/development
Development
2 parents 512b48b + c1632aa commit ec8894d

File tree

3 files changed

+45
-11
lines changed

3 files changed

+45
-11
lines changed

README.md

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
1-
# tinder-php-sdk
1+
# Tinder PHP SDK
22
Easy to use PHP SDK for accessing Tinder data.
33

4+
**NOTE:**
5+
This SDK is unofficial and based on an unofficial API with no or minimal documentation. Please use with caution as functionality might break or be completely removed each time Tinder changes it's API.
6+
7+
WARNING: NOT FOR PRODUCTION USE!
8+
49
## Installation
5-
Add the latest version of tinder-php-sdk to your ```composer.json```
10+
Add the latest version of tinder-php-sdk to your project by running
611

712
```json
8-
{
9-
"require": {
10-
"pecee/tinder-sdk": "1.*"
11-
}
12-
}
13+
composer require pecee/tinder-sdk
1314
```
1415

1516
## Examples
1617

1718
This section contains basic examples on how to use the SDK.
1819

1920
### Getting your Facebook token
20-
The easiest way to obtain your Facebook token is to visit this link:
2121

22-
**Note:** Your Facebook token will be displayed shortly in the address bar, but hurry up copying it, as the page redirects within a couple of seconds.
22+
The Tinder PHP-SDK requires a valid authorizes Facebook access-token in order to communicate to the Tinder SDK.
23+
24+
Please follow the steps below to obtain your Facebook access-token.
25+
26+
1. Navigate to the following URL.
27+
28+
[https://www.facebook.com/v2.6/dialog/oauth?redirect_uri=fb464891386855067%3A%2F%2Fauthorize%2F&state=%7B%22challenge%22%3A%22q1WMwhvSfbWHvd8xz5PT6lk6eoA%253D%22%2C%220_auth_logger_id%22%3A%2254783C22-558A-4E54-A1EE-BB9E357CC11F%22%2C%22com.facebook.sdk_client_state%22%3Atrue%2C%223_method%22%3A%22sfvc_auth%22%7D&scope=user_birthday%2Cuser_photos%2Cuser_education_history%2Cemail%2Cuser_relationship_details%2Cuser_friends%2Cuser_work_history%2Cuser_likes&response_type=token%2Csigned_request&default_audience=friends&return_scopes=true&auth_type=rerequest&client_id=464891386855067&ret=login&sdk=ios&logger_id=54783C22-558A-4E54-A1EE-BB9E357CC11F#_=](https://www.facebook.com/v2.6/dialog/oauth?redirect_uri=fb464891386855067%3A%2F%2Fauthorize%2F&state=%7B%22challenge%22%3A%22q1WMwhvSfbWHvd8xz5PT6lk6eoA%253D%22%2C%220_auth_logger_id%22%3A%2254783C22-558A-4E54-A1EE-BB9E357CC11F%22%2C%22com.facebook.sdk_client_state%22%3Atrue%2C%223_method%22%3A%22sfvc_auth%22%7D&scope=user_birthday%2Cuser_photos%2Cuser_education_history%2Cemail%2Cuser_relationship_details%2Cuser_friends%2Cuser_work_history%2Cuser_likes&response_type=token%2Csigned_request&default_audience=friends&return_scopes=true&auth_type=rerequest&client_id=464891386855067&ret=login&sdk=ios&logger_id=54783C22-558A-4E54-A1EE-BB9E357CC11F#_=)
2329

24-
[Link here](https://www.facebook.com/dialog/oauth?client_id=464891386855067&redirect_uri=https://www.facebook.com/connect/login_success.html&scope=basic_info,email,public_profile,user_about_me,user_activities,user_birthday,user_education_history,user_friends,user_interests,user_likes,user_location,user_photos,user_relationship_details&response_type=token)
30+
2. Before clicking "OK" open Chrome Developer Tools and click on the "Network" tab. Make sure to filter by XHR requests.
31+
32+
3. Click "OK" to authorize Tinder in the Facebook dialog.
33+
34+
4. Find your access_token like shown in the screenshot below:
35+
36+
![Facebook Access Token](access_token_1.png?raw=true)
2537

2638
### Authentication
2739

@@ -83,9 +95,23 @@ $tinder->updates();
8395
$tinder->recommendations();
8496
```
8597

98+
### Get friends
99+
100+
View friends from Facebook that have a Tinder profile.
101+
102+
```php
103+
$tinder->friends();
104+
```
105+
106+
### Get Tinder user by id
107+
108+
```php
109+
$tinder->user($userId);
110+
```
111+
86112
## The MIT License (MIT)
87113

88-
Copyright (c) 2015 Simon Sessingø / tinder-php-sdk
114+
Copyright (c) 2016 Simon Sessingø / tinder-php-sdk
89115

90116
Permission is hereby granted, free of charge, to any person obtaining a copy
91117
of this software and associated documentation files (the "Software"), to deal

access_token_1.png

69.6 KB
Loading

src/Pecee/Http/Service/Tinder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ public function recommendations() {
9797
return $this->api('user/recs');
9898
}
9999

100+
public function friends() {
101+
return $this->api('group/friends');
102+
}
103+
104+
public function user($userId) {
105+
return $this->api('user/' . $userId);
106+
}
107+
100108
/**
101109
* @return object|null
102110
*/

0 commit comments

Comments
 (0)