2012-11-19 3 views
2

안녕하세요 저는 facebook 앱 아이디어를 위해 FQL API를 가지고 놀고 있습니다. 테이블이 문서화 된 객체 유형을 반환하지 않는 것 같습니다. 여기에 내 좋아하는 결과가 표시됩니다.문서화되지 않은 객체 유형을 반환하는 테이블과 같은 FQL

SELECT object_id, post_id, object_type FROM like WHERE user_id = me() 

{ 
    "data": [ 
    { 
     "object_id": "10151258431583394", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 478582878859930, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": 521644514513038, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": 106925839472986, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10101021654513450", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10101017009447200", 
     "post_id": "", 
     "object_type": "photo" 
    }, 
    { 
     "object_id": "10151245338443394", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 162988417181213, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": 439293976134330, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": 440364829332399, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151229280723394", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 489203737786963, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": "10152125564767619", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151113526476775", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151113525441775", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151113524916775", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151113523716775", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 123390361144776, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": "10151199315428394", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 278542695598345, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": 425466477503260, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 531362840223562, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 531362946890218, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 517081921654425, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": "10151184643108394", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 285512984897612, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 284572424991668, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10152126582670161", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151172644678394", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10100959925933020", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 170144483122267, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": "10152100222280161", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335741896516584, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151216733207457", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10150966158886775", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 357351974342058, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": "10152073370825161", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 337226756372190, 
     "post_id": "", 
     "object_type": "list" 
    }, 
    { 
     "object_id": "10151044156886775", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 122273294554916, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10152061553435161", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151149031423896", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10152074656495188", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335744249849682, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335744153183025, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335743509849756, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335743463183094, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335743403183100, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335743376516436, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335743259849781, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335743139849793, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335742603183180, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335742569849850, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335742419849865, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335742323183208, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335742226516551, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335742213183219, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335742169849890, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 335742033183237, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10101326761860672", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151035255316775", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10152047005670511", 
     "post_id": "", 
     "object_type": "photo" 
    }, 
    { 
     "object_id": "10151194367147619", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151111702663394", 
     "post_id": "", 
     "object_type": "photo" 
    }, 
    { 
     "object_id": 732497948354, 
     "post_id": "", 
     "object_type": "photo" 
    }, 
    { 
     "object_id": "10152002641675161", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 390781734321391, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151185665687317", 
     "post_id": "", 
     "object_type": "photo" 
    }, 
    { 
     "object_id": "10152014894905188", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151161548307619", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151161549777619", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151161552387619", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151118986026775", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": 191434787659630, 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151003723472163", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10100932691640760", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10100253964691241", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10100253951333011", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151163103492619", 
     "post_id": "", 
     "object_type": "profile" 
    }, 
    { 
     "object_id": "10151161573682619", 
     "post_id": "", 
     "object_type": "profile" 
    } 
    ] 
} 

대부분의 개체 유형은 프로필 또는 목록이며, 대부분의 프로필 개체 유형을 쿼리 할 때 "지원되지 않는 요청"이 표시됩니다. 예외.

이러한 개체에 대한 자세한 정보를 검색하려면 어떻게해야합니까? 사진, 앨범, 이벤트, 그룹, 메모, 링크, 동영상, 애플리케이션, 상태, 체크인, 리뷰, 댓글, 게시물 유형이없는 이유는 무엇입니까?

의도 한대로 작동하지 않거나 기능이 변경되었지만 설명서가 업데이트되지 않은 것으로 보입니다.

답변

1

몇 가지 방법이 있습니다.

각 좋아하는 개체에 대한 추가 정보를 얻기 위해 후속 쿼리를 실행할 수 있습니다. 예를 들어 :

select src_big from photo where object_id="10151287927181749" 

그러나

, 나는 연결을 따라 하나 개의 쿼리로 연결된 개체에 대한 데이터를 가져 오기 위해 그래프 API와 '필드의 확장 "을 사용하여 선호. 예를 들어 :

https://graph.facebook.com/me?fields=likes.fields(link,likes,cover)

https://graph.facebook.com/USER_ID?fields=likes.fields(link,likes,cover)

Demo using the Explorer

이 쿼리는 각 좋아에 대한 현재 사용자 반환 카운트 같은 링크 및 커버 이미지 URL 에 대한 모든 좋아하는 것을 얻는다 객체.

https://developers.facebook.com/docs/reference/api/field_expansion/

:

연결된 객체의 필드를 연결에 따라 쿼리를 작성하고 반환 할 필드 확장 문서를 참조하십시오
관련 문제