guillaumebarranco / kebhub-api
First version of Kebhub API for tests
dev-master
2015-03-12 15:39 UTC
This package is not auto-updated.
Last update: 2025-05-10 19:39:38 UTC
README
A Repository for out Kebhub API utilisation
$settings = array(
'client_id' => "YOUR CLIENT ID",
'secret_id' => "YOUR SECRET ID",
'api_key' => "YOUR API KEY"
);
$type = 'twitter'; // choices : "twitter", "instagram", "all"
$fields = 'all'; // choices : "text, picture, date, title, type, link" OR "all"
$limit = '3'; // choices every number more than "0"
$kebhub = new KebhubAPIGet($settings); // Launch the API class with your settings
$access_token = $kebhub->getAccessToken(); // Get your access token
$url = 'http://kebhub.com/api/get/'.$type.'/'.$limit.'/'.$fields.'?access_token='.$access_token;
// Make the url request with your settings and access_token
$json = $kebhub->performRequest($url, true); // ¨Perform the request and it's done !
$datas = json_decode($json, true);