Facebook 에서 데이터를 가져오는 방법에 대해 설명하고, 1~2개 정도의 실제 예제를 확인합니다.
class FacebookOAuth (cont'd)
- mixed get($url, $parameters = array())
API
- GET me
- GET me/home
Paging
- limit
- since
- until
- offset
Code snippet
- simple query
// Access token 을 포함한 TwitterOAuth object 생성
$connection = new FacebookOAuth($consumer_key, $consumer_secret, $token);
// get user profile
$user = $connection->get('me');
// get home timeline
$timeline = $connection->get('me/home');
// parameter
$params = array('limit'=>10);
$timeline2 = $connection->get('me/home', $params);
External Links
- http://developers.facebook.com/docs/reference/api/ : Facebook Graph API reference
- http://cheat.errtheblog.com/s/fbgraph/ : Facebook Graph API Cheet sheet

