Download the PHP package graphcomment/sdk-api-php without Composer

On this page you can find all versions of the php package graphcomment/sdk-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk-api-php

Scrutinizer Code Quality Build Status

Graphcomment SDK API PHP version 2.3.2

install with composer :

composer require graphcomment/sdk-api-php

With this wrapper you will be able to :

Example of implementation :

$client = new Sdk(GC_PUBLIC_KEY, GC_SECRET_KEY);

after theses lines, you call the functions.

$client->registerUser('username', 'email', 'fr', 'https://graphcomment.com/image.jpg');

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 and do_sync date of synchronisation to save too.

$client->loginUser('gc_id');

to save in localStorage the gc_token, call this url in an iframe with 0px width, 0px width of user to authenticate him => https://graphcomment.com/fr/auth.html?gc_token=[TOKEN-without-JWT-only-token]

to destroy session localStorage, call this url in an iframe with 0px width, 0px width of user => https://graphcomment.com/fr/destroy.html

Example :

Connexion :

<iframe src="https://graphcomment.com/fr/auth.html?gc_token=eyJhbGciOiJIUzI1NiIsInR5cCI6kpXVCJ9.eyJfaWQiOiI1OGY5ZjQ5OTk3NzkwOTBkODYyMDgwOTIiLCJ1c2VybmFtZSI6ImRhdmlkIGRqaWFuIiwiZW1haWwiOiJzaXJiYWxkdXJAZ21haWwuY29tIiwiZmFjZWJvb2tfaWQiOiIxMDE1NDE3Mjk2NzQ1MTQ5MSIsImdvb2dsZV9pZCI6IjExNjEwMTAxNzgxODA3MjI5MDk0OCIsInJvbGUiOJ1c2VyIiwicGljdHVyZSI6Ii9pbWFnZXMvYXZhdGFyXzMucG5nIiwibGFuZ3VhZ2UiOiJmciIsImZyb21fd2Vic2l0ZSI6IjU4MWQyMTlmOGRmY2EwMzlhY2MMGZiZiIsInZhbGlkYXRpb24iOnt9LCJpYXQiOjE0OTk2ODYxMjIsImV4cCI6MTUwMjI3ODEyMn0.YyiANmL4-wzu1XGak1SbBmywZOWLHwjYsXtBW-Ikqx4 " frameborder="0" style="width:0px;height:0px;"></iframe>

Disconnection :

<iframe src="https://graphcomment.com/fr/destroy.html" frameborder="0" style="width:0px;height:0px;"></iframe>

$client->getUser('gc_id');

get user's informations, return a JSON.

$client->updateUser('gc_id', 'username', 'email', 'fr', 'https://graphcomment.com/image.jpg');

return do_sync date and gc_id with state 'updated'

$client->countCommentscountComments('https://graphcomment.com/thread.html', 'content123');

This query is limited by 100 comments for each query.

$client->exportComments();

list 100 comments in json array :

$client->exportConfirmComments([comment_id1, comment_id2, comment_id3...]);

This query return a JSON Array of object :

$client->getThreadJsonLdFormat('https://graphcomment.com/thread.html', 'content123');

message is present only if an error exist for a comment upgrade in our database.

Comment export returns the comment if it has changed status, or if it has been edited by the user in case of account deletion or normal editing. you have to do an update or insert function depending on the case.

So you can make a job to get all minutes and import the graphcomment comments in your database.


All versions of sdk-api-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
guzzlehttp/guzzle Version ^6.3
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package graphcomment/sdk-api-php contains the following files

Loading the files please wait ....