Пример #1
0
$post_value = $_POST;
$post_func = isset($post_value['func']) && !empty($post_value['func']) ? trim($post_value['func']) : '';
$accessToken = isset($_SESSION['access_token']) && !empty($_SESSION['access_token']) ? trim($_SESSION['access_token']) : '';
$userRegBasic = new SocialLoginAPI(LR_API_KEY, LR_API_SECRET, array('authentication' => false, 'output_format' => 'json'));
try {
    if ($post_func == 'extendedProfile') {
        $output = $userRegBasic->getUserProfiledata($accessToken);
    } else {
        if ($post_func == 'contact') {
            $output = $userRegBasic->getContacts($accessToken);
        } else {
            if ($post_func == 'likes') {
                $output = $userRegBasic->getLikes($accessToken);
            } else {
                if ($post_func == 'albums') {
                    $output = $userRegBasic->getPhotoAlbums($accessToken);
                } else {
                    if ($post_func == 'checkins') {
                        $output = $userRegBasic->getCheckins($accessToken);
                    } else {
                        if ($post_func == 'audio') {
                            $output = $userRegBasic->getAudio($accessToken);
                        } else {
                            if ($post_func == 'mentions') {
                                $output = $userRegBasic->getMentions($accessToken);
                            } else {
                                if ($post_func == 'following') {
                                    $output = $userRegBasic->getFollowing($accessToken);
                                } else {
                                    if ($post_func == 'events') {
                                        $output = $userRegBasic->getEvents($accessToken);