Kraken Social Web

Programming 2014. 5. 23. 22:37

Kraken social web is made for gathering data of Social Media such as Facebook, Twitter and Linked-in. The first version of its API supports Facebook Graph API.Other functions and platforms will be developed later. First, in Facebook, every API returns JSON Object consisted offluctuating data field according to permissions. You can earn Social Web Data by using the following simple functions and rule.

If you want to get information about youself, you can use function like this: getSpecificInfo(“YOUR_ID” or “me”) or getBasicInfo(“YOUR_ID” or “me”) -(“me” is a constant in Facebook).These functions have differences in return form only. First one returns JSON Array form and the other one returns single JSON Object form. Its difference is based on fluctuating count of data in Facebook by one Graph API query. This means if data exceed quantity to be able to show in one page, Facebook will send paged information.

All objects in Facebook have connections. For example, one user has a one’s own connection by user’s id. And user’s id has connections such as post, feed, like, album and so on.So you can get information through getSpecificInfo(“YOUR_ID” or “me” , “CONNECTION”) or getBasicInfo(“YOUR_ID” or “me” , “CONNECTION”). Like the above example,, all objects have connections, so you can use like getSpecificInfo(“OBJECT ID” , “CONNECTION”) and  getBasicInfo(“OBJECT ID” or “me” , “CONNECTION”).

follow a few steps to use this Library.

1. get your or user’s Access Token to access Facebook Graph API. if you want temporary Access token, visit “https://developers.facebook.com/tools/explorer?method=GET&path=100002488995162%3Ffields%3Did%2Cname”. and then you can earn your Access Token. or if you want permission not temporary, use the Oauth though Facebook App.

2. Now, you already get the Access Token of Facebook, use like this: Facebook graph = new Facebook(YOUR_ACCESS_TOKEN, CALL_BACK_URL{it can be null or not}).

3. Then, you can access information through this object by using functions like this: graph.getBasicInfo or graph.getSpecificInfo. and you can get the JSON Object including user’s information.

here are some examples.

  • graph.getBasicInfo(“me”);
  • graph.getBasicInfo(“me”,”friends”);
  • graph.getBasicInfo(“me”,”home”);
  • graph.getBasicInfo(“me”,”feed”);
  • graph.getBasicInfo(“me”,”likes”);
  • graph.getBasicInfo(“me”,”movies”);
  • graph.getBasicInfo(“me”,”music”);
  • graph.getBasicInfo(“me”,”books”);
  • graph.getBasicInfo(“me”,”notes”);
  • graph.getBasicInfo(“me”,”permissions”);
  • graph.getBasicInfo(“me”,”photos”);
  • graph.getBasicInfo(“me”,”album”);
  • graph.getBasicInfo(“me”,”videos”);
  • graph.getBasicInfo(“me”,”video/uploaded”);
  • graph.getBasicInfo(“me”,”events”);
  • graph.getBasicInfo(“me”,”groups”);
  • graph.getBasicInfo(“me”,”checkins”);
  • graph.getBasicInfo(“me”,”locations”);
  • and you can use graph.getSpecificInfo in same way
  • also you can use like this: User user = new User(); user.parseJson(graph.getBasicInfo(“me”)); every object has appropriate pair object to parse


'Programming' 카테고리의 다른 글

Funf FrameWork  (0) 2014.05.23
Funf Tutorial: Wifi Scanner Structure  (0) 2014.05.23
Funf Project  (0) 2014.05.23
Posted by MeatNBrew
l