Skip to content

Commit 591f877

Browse files
author
David Djian
committed
2 parents 263e81b + 2ab1968 commit 591f877

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/graphcomment/sdk-api-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/graphcomment/sdk-api-php/?branch=master)
2+
13
#Graphcomment SDK API PHP version 1.0
24

35
install with composer :
@@ -29,10 +31,16 @@ after theses lines, you call the functions.
2931

3032
This function return a json file containing its "gc_id" that must be save in your database to authenticate a user that is logging in.
3133

32-
- login a User, this function return the token JWT that you must save in localStorage to authenticate Graphcomment.
34+
- login a User, this function return the token JWT as JSON that you must save in localStorage to authenticate Graphcomment.
3335

3436
`$client->loginUser('email', 'gc_id');`
3537

38+
to save in localStorage the gc_token, call this url in ajax navigator of user to authenticate him => http://graphcomment.com/fr/auth.html?gc_token=[TOKEN-without-JWT-only-token]
39+
40+
Example :
41+
42+
http://graphcomment.com/fr/auth.html?gc_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1OGY5ZjQ5OTk3NzkwOTBkODYyMDgwOTIiLCJ1c2VybmFtZSI6ImRhdmlkIGRqaWFuIiwiZW1haWwiOiJzaXJiYWxkdXJAZ21haWwuY29tIiwiZmFjZWJvb2tfaWQiOiIxMDE1NDE3Mjk2NzQ1MTQ5MSIsImdvb2dsZV9pZCI6IjExNjEwMTAxNzgxODA3MjI5MDk0OCIsInJvbGUiOJ1c2VyIiwicGljdHVyZSI6Ii9pbWFnZXMvYXZhdGFyXzMucG5nIiwibGFuZ3VhZ2UiOiJmciIsImZyb21fd2Vic2l0ZSI6IjU4MWQyMTlmOGRmY2EwMzlhY2MMGZiZiIsInZhbGlkYXRpb24iOnt9LCJpYXQiOjE0OTk2ODYxMjIsImV4cCI6MTUwMjI3ODEyMn0.YyiANmL4-wzu1XGak1SbBmywZOWLHwjYsXtBW-Ikqx4
43+
3644
- Get the list of your users
3745

3846
`$client->getUsersQuery("10", "1", "kevin");`
@@ -41,4 +49,4 @@ get the list of users with name "kevin" that subscribe to GC.
4149

4250
get the threads and comments by url of a page (without http or https) then return a json with all comments and interactions.
4351

44-
`$client->getThread("//graphcomment.com/demo");`
52+
`$client->getThread("//graphcomment.com/demo");`

0 commit comments

Comments
 (0)