Beispiel #1
0
$scopes = array('basic', 'likes', 'comments', 'relationships');
?>
<a href="<?php 
echo $ig->getLoginUrl($scopes);
?>
">Login</a>
<?php 
$users = $ig->searchUser('maanmughal87', 1);
echo '<pre>users:';
print_r($users);
$code = $_GET['code'];
$data = $ig->getOAuthToken($code);
echo '<pre>';
print_r($data);
// set user access token
$ig->setAccessToken($data);
// get all user likes
$likes = $ig->getUserLikes();
// take a look at the API response
echo '<pre>likes';
print_r($likes);
echo '<pre>';
// get all user likes
$follows = $ig->getUserFollows();
// take a look at the API response
echo '<pre>follows';
print_r($follows);
echo '<pre>';
$followship = $ig->modifyRelationship('follow', 2057410915);
echo '<br />followship';
print_r($followship);