Beispiel #1
0
            		foreach($output['data'] as $k=>$row){
            			if($row['name']=="Profile Pictures")
            			$album_id = $row['id'];
            		
            		}
            		
            		//fetching images of user based on fbid		
            		$albums=Users::getPhotosJson($fb_token,$album_id);
            		
            		//saving images fetched in album
            		$albums_saved= Users::AddPhotos($uid,$albums,$fb_token);
            		}*/
            //fetching interests json
            $interest = Users::getInterestJson($fb_token, $fbid);
            //saving interests
            $interest_saved = Users::AddCommonInterests($uid, $interest);
        }
        $success = '1';
        $msg = "Updated";
    } else {
        $success = '0';
        $msg = "Token Expired";
    }
}
if ($success) {
    $profile = Users::myprofile($user_id);
    $friend_count = GeneralFunctions::getAllFriendsCount($user_id);
    echo json_encode(array('success' => $success, 'msg' => $msg, 'profile' => $profile, 'friend_count' => $friend_count));
} else {
    echo json_encode(array('success' => $success, 'msg' => $msg));
}