Social

Facebook :: 읽어오기

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

댓글

댓글 본문
버전 관리
egoing
현재 버전
선택 버전
graphittie 자세히 보기