Skip to content

Commit c17fbe6

Browse files
committed
unix eol
1 parent 295f6ee commit c17fbe6

14 files changed

+487
-517
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@
44
*.json
55
*.lock
66
/vendor
7-
8-
/examples

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Hybridauth Change log
2-
=====================
1+
Hybridauth ChangeLog
2+
====================
33

44
3.1.0 - TBD
5-
...
5+
...

COPYING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2323
THE SOFTWARE.
2424

2525

26-
==============
26+
-----------------------
2727

2828

2929
HybridAuth includes a copy of LightOpenID, licensed as follows:
@@ -49,7 +49,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4949
THE SOFTWARE.
5050

5151

52-
==============
52+
-----------------------
5353

5454

5555
HybridAuth includes a modified copy of OAuth PHP Library, licensed as follows:

README.md

+44-73
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
[![Join the chat at https://gitter.im/hybridauth/hybridauth](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hybridauth/hybridauth?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
55

66

7-
Notes:
8-
This is a work in progress and subject to changes at any time.
9-
Below is probably what going to be the new readme file.
10-
Update, changes and remakes are welcome.
7+
IMPORTANT: This is a work in progress and subject to changes at any time.
118

129
Hybridauth enables developers to easily build social applications and tools to engage websites visitors and customers on a social level by implementing social sign-in, social sharing, users profiles, friends list, activities stream, status updates and more.
1310

@@ -24,86 +21,60 @@ Hybridauth provides a number of basic [examples](https://github.com/hybridauth/h
2421
##### New way of doing things :
2522

2623
```php
27-
<?php
28-
29-
require 'vendor/autoload.php';
30-
31-
$config = [
32-
'callback' => 'http://localhost/hybridauth/examples/twitter.php',
33-
34-
'keys' => [
35-
'key' => 'your-consumer-key',
36-
'secret' => 'your-consumer-secret'
37-
],
38-
39-
/*
40-
OPTIONAL: Connect with a pair of access tokens
41-
'tokens' => [
42-
'access_token' => 'your-access-token',
43-
'access_token_secret' => 'your-access-token-secret',
44-
],
45-
46-
OPTIONAL: Redefine providers endpoints
47-
'endpoints' => [
48-
'api_base_url' => 'https://api.twitter.com/1.1/',
49-
'authorize_url' => 'https://api.twitter.com/oauth/authenticate',
50-
'request_token_url' => 'https://api.twitter.com/oauth/request_token',
51-
'access_token_url' => 'https://api.twitter.com/oauth/access_token',
52-
]
53-
*/
54-
];
55-
56-
$twitter = new Hybridauth\Provider\Twitter( $config );
57-
58-
try {
59-
$twitter->authenticate();
60-
61-
$userProfile = $twitter->getUserProfile();
62-
63-
$accessToken = $twitter->getAccessToken();
64-
65-
$apiResponse = $twitter->apiRequest( 'statuses/home_timeline.json' );
66-
}
67-
catch( Exception $e ){
68-
echo "Ooophs, we ran into an issue! " . $e->getMessage();
69-
}
70-
?>
24+
require 'vendor/autoload.php';
25+
26+
$config = [
27+
'callback' => 'http://localhost/hybridauth/examples/twitter.php',
28+
29+
'keys' => [ 'key' => 'your-consumer-key', 'secret' => 'your-consumer-secret' ]
30+
];
31+
32+
$twitter = new Hybridauth\Provider\Twitter( $config );
33+
34+
try {
35+
$twitter->authenticate();
36+
37+
$userProfile = $twitter->getUserProfile();
38+
39+
$accessToken = $twitter->getAccessToken();
40+
41+
$apiResponse = $twitter->apiRequest( 'statuses/home_timeline.json' );
42+
}
43+
catch( Exception $e ){
44+
echo "Ooophs, we ran into an issue! " . $e->getMessage();
45+
}
7146
```
7247

7348
##### Legacy way (Compatible with Hybridauth 2.x)
7449

75-
Please refer to [Upgrade guide](https://github.com/hybridauth/hybridauth/blob/master/UPGRADING.md) to make the neccessary changes to your existing application in order to make it work with HybridAuth 3.x.
50+
Please refer to [Upgrade guide](http://hybridauth.github.io/developer-ref-migrating.html) to make the neccessary changes to your existing application in order to make it work with HybridAuth 3.x.
7651

7752
```php
78-
<?php
79-
80-
require 'hybridauth_autoload.php';
81-
82-
$config = array(
83-
'base_url' => 'http://localhost/hybridauth/examples/callback.php',
53+
require 'hybridauth_autoload.php';
8454

85-
'providers' => array(
86-
'GitHub' => array(
87-
'enabled' => true,
88-
'keys' => array ( 'id' => '', 'secret' => '' ),
89-
)
90-
)
91-
);
55+
$config = array(
56+
'base_url' => 'http://localhost/hybridauth/examples/callback.php',
9257

93-
$hybridauth = new Hybridauth( $config );
58+
'providers' => array(
59+
'GitHub' => array(
60+
'enabled' => true,
61+
'keys' => array ( 'id' => '', 'secret' => '' ),
62+
)
63+
)
64+
);
9465

95-
try{
96-
$github = $hybridauth->authenticate( "GitHub" );
66+
$hybridauth = new Hybridauth( $config );
9767

98-
$user_profile = $github->getUserProfile();
68+
try{
69+
$github = $hybridauth->authenticate( "GitHub" );
9970

100-
echo "Hi there " . $user_profile->displayName;
101-
}
102-
catch( Exception $e ){
103-
echo "Ooophs, we ran into an issue! " . $e->getMessage();
104-
}
71+
$user_profile = $github->getUserProfile();
10572

106-
?>
73+
echo "Hi there " . $user_profile->displayName;
74+
}
75+
catch( Exception $e ){
76+
echo "Ooophs, we ran into an issue! " . $e->getMessage();
77+
}
10778
```
10879

10980
#### Requirements
@@ -129,7 +100,7 @@ When using Composer, you have to add Hybridauth to your project dependencies:
129100

130101
```
131102
"require": {
132-
"hybridauth/hybridauth": "3.0.*"
103+
"hybridauth/hybridauth": "3.0.*"
133104
}
134105
```
135106

docs/_generate.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ function generate()
1010
'index.html',
1111
'documentation.html',
1212
'license.html',
13+
'support.html',
1314
'getinvolved.html',
15+
'search.html',
1416

1517
'install.html',
1618
'providers.html',

docs/assets/css/prettify.css

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
.pln { color: #48484c; }
99

1010
.prettyprint {
11-
padding: 8px;
12-
background-color: #f7f7f9;
13-
border: 1px solid #e1e1e8;
11+
padding: 8px;
12+
background-color: #f7f7f9;
13+
border: 1px solid #e1e1e8;
1414
}
1515
.prettyprint.linenums {
1616
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
@@ -20,19 +20,19 @@
2020

2121
/* Specify class=linenums on a pre to get line numbering */
2222
ol.linenums {
23-
margin: 0 0 0 33px; /* IE indents via margin-left */
23+
margin: 0 0 0 33px; /* IE indents via margin-left */
2424
}
2525
ol.linenums li {
26-
padding-left: 12px;
27-
color: #bebec5;
28-
line-height: 20px;
29-
text-shadow: 0 1px 0 #fff;
26+
padding-left: 12px;
27+
color: #bebec5;
28+
line-height: 20px;
29+
text-shadow: 0 1px 0 #fff;
3030
}
3131
.prettyprint code {
3232
background-color: #ffd88f;
3333
border-radius: 4px;
3434
color: #c7254e;
3535
font-size: 90%;
3636
padding: 2px 4px;
37-
text-shadow: 0 1px 0 #ffcf75;
38-
}
37+
text-shadow: 0 1px 0 #ffcf75;
38+
}

0 commit comments

Comments
 (0)