|
1 | | -# tinder-php-sdk |
| 1 | +# Tinder PHP SDK |
2 | 2 | Easy to use PHP SDK for accessing Tinder data. |
3 | 3 |
|
| 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 | + |
4 | 9 | ## 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 |
6 | 11 |
|
7 | 12 | ```json |
8 | | -{ |
9 | | - "require": { |
10 | | - "pecee/tinder-sdk": "1.*" |
11 | | - } |
12 | | -} |
| 13 | +composer require pecee/tinder-sdk |
13 | 14 | ``` |
14 | 15 |
|
15 | 16 | ## Examples |
16 | 17 |
|
17 | 18 | This section contains basic examples on how to use the SDK. |
18 | 19 |
|
19 | 20 | ### Getting your Facebook token |
20 | | -The easiest way to obtain your Facebook token is to visit this link: |
21 | 21 |
|
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#_=) |
23 | 29 |
|
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 | + |
25 | 37 |
|
26 | 38 | ### Authentication |
27 | 39 |
|
@@ -83,9 +95,23 @@ $tinder->updates(); |
83 | 95 | $tinder->recommendations(); |
84 | 96 | ``` |
85 | 97 |
|
| 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 | + |
86 | 112 | ## The MIT License (MIT) |
87 | 113 |
|
88 | | -Copyright (c) 2015 Simon Sessingø / tinder-php-sdk |
| 114 | +Copyright (c) 2016 Simon Sessingø / tinder-php-sdk |
89 | 115 |
|
90 | 116 | Permission is hereby granted, free of charge, to any person obtaining a copy |
91 | 117 | of this software and associated documentation files (the "Software"), to deal |
|
0 commit comments