Friendly Korea Community Screenshot

The Friendly Korea Community API is an API (Application Programming Interface) which brings us the possibility of use simple classes for access to the data of the website http://chingu.prkorea.com.

On Friendly Korea Community, you are able to find korean and international friends how love Korea culture, music, people, movies, food, so on. Furthermore, you can join in the community and post messages to people how are there. To sum up, it’s a kind of Korean’s Facebook.

Nowadays, I have a beta version with several classes. With this classes, an user can:

  1. login as user, see his complete own information (name, family name, country, gender, …), see his photo URL.
  2. watch a list of his friends with their names, photos URL and their complete information (name, family name, country, gender, …).

DownloadDownload this file from SourceForge.net
Friendly Korea Community API – 0.1.0
Last Update: May 15 2009
SourceForge.net

Complete Code Example (v.0.0.2)

  1. <?php
  2. include_once(‘Fkc.class.php’);
  3.  
  4. // Login settings
  5. $email = ‘[YOUR_FKC_USER_EMAIL]‘;
  6. $password = ‘[YOUR_FKC_USER_PASSWORD]‘;
  7.  
  8. // Creating a new instance of FKC API
  9. $fkc = new Fkc();
  10.  
  11. // Logining into FKC
  12. if (!$fkc->login($email, $password))
  13. {
  14.   echo “It is a wrong email or password.”;
  15.   die();
  16. }
  17.  
  18. // Getting a object of FkcUser that represents our user.
  19. $me = $fkc->getUser();
  20.  
  21. // Getting our friends. It’s and array of FkcFriend.
  22. $friends = $me->get(‘Friends’);
  23.  
  24. // Showing our information
  25. echo “<h1>Our information: “ . $me->get(‘Name’) . ” “ . $me->get(‘FamilyName’) . “</h1>” .
  26.   “&nbsp; <b>Id</b>: “ . $me->get(‘Id’) . “<br />” .
  27.   “&nbsp; <b>Email</b>: “ . $me->get(‘Email’) . “<br />” .
  28.   “&nbsp; <b>Gender</b>: “ . $me->get(‘Gender’) . “<br />” .
  29.   “&nbsp; <b>Born Date</b>: “ . $me->get(‘BornDate’) . “<br />” .
  30.   “&nbsp; <b>Country</b>: “ . $me->get(‘Country’) . “<br />” .
  31.   “&nbsp; <b>Residential Country</b>: “ . $me->get(‘ResidentialCountry’) . “<br />” .
  32.   “&nbsp; <b>Residential City</b>: “ . $me->get(‘ResidentialCity’) . “<br />” .
  33.   “&nbsp; <b>Profession</b>: “ . $me->get(‘Profession’) . “<br />” .
  34.   “&nbsp; <b>Interests</b>: “ . $me->get(‘Interests’) . “<br />” .
  35.   “&nbsp; <b>About me</b>: “ . $me->get(‘About’) . “<br />” .
  36.   “&nbsp; <b>Favorite Movie</b>: “ . $me->get(‘FavoriteMovie’) . “<br />” .
  37.   “&nbsp; <b>Favorite Entertainent</b>: “ . $me->get(‘FavoriteEntertainent’) . “<br />” .
  38.   “&nbsp; <b>Favorite Drama</b>: “ . $me->get(‘FavoriteDrama’) . “<br />” .
  39.   “&nbsp; <b>Favorite Place</b>: “ . $me->get(‘FavoritePlace’) . “<br />” .
  40.   “&nbsp; <b>Favorite Food</b>: “ . $me->get(‘FavoriteFood’) . “<br />” .
  41.   “&nbsp; <b>Photo URL</b>: “ . $me->get(‘Photo’) . “<br /><br />”;
  42.  
  43. // Showing friends information
  44. echo “<h1>My friends</h1><br />”;
  45. foreach ($friends as $friend)
  46. {
  47.   echo “<h2>” . $friend->get(‘Name’) . ” “ . $friend->get(‘FamilyName’) . “</h2>” .
  48.     “&nbsp; <b>Id</b>: “ . $friend->get(‘Id’) . “<br />” .
  49.     “&nbsp; <b>Email</b>: “ . $friend->get(‘Email’) . “<br />” .
  50.     “&nbsp; <b>Gender</b>: “ . $friend->get(‘Gender’) . “<br />” .
  51.     “&nbsp; <b>Born Date</b>: “ . $friend->get(‘BornDate’) . “<br />” .
  52.     “&nbsp; <b>Country</b>: “ . $friend->get(‘Country’) . “<br />” .
  53.     “&nbsp; <b>Residential Country</b>: “ . $friend->get(‘ResidentialCountry’) . “<br />” .
  54.     “&nbsp; <b>Residential City</b>: “ . $friend->get(‘ResidentialCity’) . “<br />” .
  55.     “&nbsp; <b>Profession</b>: “ . $friend->get(‘Profession’) . “<br />” .
  56.     “&nbsp; <b>Interests</b>: “ . $friend->get(‘Interests’) . “<br />” .
  57.     “&nbsp; <b>About me</b>: “ . $friend->get(‘About’) . “<br />” .
  58.     “&nbsp; <b>Favorite Movie</b>: “ . $friend->get(‘FavoriteMovie’) . “<br />” .
  59.     “&nbsp; <b>Favorite Entertainent</b>: “ . $friend->get(‘FavoriteEntertainent’) . “<br />” .
  60.     “&nbsp; <b>Favorite Drama</b>: “ . $friend->get(‘FavoriteDrama’) . “<br />” .
  61.     “&nbsp; <b>Favorite Place</b>: “ . $friend->get(‘FavoritePlace’) . “<br />” .
  62.     “&nbsp; <b>Favorite Food</b>: “ . $friend->get(‘FavoriteFood’) . “<br />” .
  63.     “&nbsp; <b>Photo URL</b>: “ . $friend->get(‘Photo’) . “<br /><br />”;
  64. }
  65. ?>

 

<?php
include_once(‘Fkc.class.php’);

// Login settings
$email = ‘eridem@gmail.com’;
$password = ‘v’;

// Creating a new instance of FKC API
$fkc = new Fkc();

// Logining into FKC
if (!$fkc->login($email, $password))
{
        echo “It is a wrong email or password.”;
        die();
}

// Getting a object of FkcUser that represents our user.
$me = $fkc->getUser();

// Getting our friends. It’s and array of FkcUser.
$friends = $fkc->getFriends();

// Showing our information
echo    “<h1>Our information: “ . $me->getName() . ” “ . $me->getFamilyName . “</h1>” .
                “&nbsp; &nbsp; &nbsp; <b>Email</b></b>: “ . $email . “<br />” .
                “&nbsp; &nbsp; &nbsp; <b>Gender</b></b>: “ . $me->get(‘Gender’) . “<br />” .
                “&nbsp; &nbsp; &nbsp; <b>Country</b></b>: “ . $me->get(‘Country’) . “<br />” .
                “&nbsp; &nbsp; &nbsp; <b>Residential Country</b></b>: “ . $me->get(‘ResidentialCountry’) . “<br />” .
                “&nbsp; &nbsp; &nbsp; <b>Photo URL</b></b>: “ . $me->getPhoto() . “<br /><br />”;

// Showing friends information
echo    “<h1>My friends</h1><br />”;
foreach ($friends as $myFriend)
{
        echo    “<h2>” . $myFriend->getFullName() . “</h2>” .
                        “&nbsp; &nbsp; &nbsp; <b>Id</b></b>: “ . $myFriend->getId() . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Email</b></b>: “ . $myFriend->get(‘Email’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Gender</b></b>: “ . $myFriend->get(‘Gender’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Born Date</b></b>: “ . $myFriend->get(‘BornDate’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Country</b></b>: “ . $myFriend->get(‘Country’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Residential Country</b></b>: “ . $myFriend->get(‘ResidentialCountry’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Residential City</b></b>: “ . $myFriend->get(‘ResidentialCity’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Profession</b></b>: “ . $myFriend->get(‘Profession’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Interests</b></b>: “ . $myFriend->get(‘Interests’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>About me</b></b>: “ . $myFriend->get(‘About’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Favorite Movie</b></b>: “ . $myFriend->get(‘FavoriteMovie’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Favorite Entertainent</b></b>: “ . $myFriend->get(‘FavoriteEntertainent’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Favorite Drama</b></b>: “ . $myFriend->get(‘FavoriteDrama’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Favorite Place</b></b>: “ . $myFriend->get(‘FavoritePlace’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Favorite Food</b></b>: “ . $myFriend->get(‘FavoriteFood’) . “<br />” .
                        “&nbsp; &nbsp; &nbsp; <b>Photo URL</b>: “ . $myFriend->getPhoto() . “<br /><br />”;
}
?>