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

댓글

댓글 본문
  1. 오링
    질문이 있습니다~!!
    Notice: Trying to get property of non-object in C:\xampp\htdocs\facebookoauth.php on line 144
    이런 오류가 계속 나오는데 이게 왜 일어나는지...잘 모르겠습니다 ㅠㅠ
  2. 시드
    정말 좋은 강의네요.
  3. 모비딕
    아름다운 세상 만드시는 분들~~~
  4. 쌈닭
    :D
버전 관리
egoing
현재 버전
선택 버전
graphittie 자세히 보기