2011-06-16 88 views
1

我抓住了喜歡我的朋友,但我也想抓住那些喜歡的鏈接。臉書,如何獲得更多關於喜歡的信息?

當你喜歡牆上的東西時,它會指向某個東西,無論你喜歡什麼。我正在談論所有這些鏈接。

編輯: 我得到現在的反應看起來類似:

{ 
"data": [ 
    { 
    "name": "Seam Legging - Shooting Star", 
    "category": "Product/service", 
    "id": "114310318626160", 
    "created_time": "2011-06-15T22:26:18+0000" 
    }, 
    { 
    "name": "Junior's 535\u2122 Legging - Seaport Blue", 
    "category": "Product/service", 
    "id": "146626898728947", 
    "created_time": "2011-06-15T22:26:17+0000" 
    }, 
    { 
    "name": "Singer Needed For Pleasure Band CA Music Vocals Los Angeles, CA auditions Modeling Acting Auditions & Casting Calls ExploreTalent modeling audition america next top model", 
    "category": "Website", 
    "id": "122740287810745", 
    "created_time": "2011-06-15T19:06:13+0000" 
    }, 
    { 
    "name": "Looking for singers R/B Britney type K P Music Vocals Los Angeles, CA auditions Modeling Acting Auditions & Casting Calls ExploreTalent extras acting extra", 
    "category": "Website", 
    "id": "130850386995940", 
    "created_time": "2011-06-15T19:06:12+0000" 
    },...... 

EDIT2:

我一直在嘗試使用FQL。但我仍然不明白的鏈接從裏面喜歡:

她是迄今爲止

<?php 
$facebook = new Facebook(array(
'appId' => $client_id, 
'secret' => $client_secret, 
'cookie' => true, 
)); 

$session = $facebook->getSession(); 
$likelink = $facebook->api(array('method' => 'fql.query', 'query' => 'SELECT likes FROM stream WHERE source_id ='.$myself.'',)); 
print_r($likelink); 

?> 
+0

可以請您展示通過API調用返回給您的JSON對象嗎? – 2011-06-16 16:18:41

+0

'{ 「數據」: { 「名」: 「縫裹腿 - 射擊之星」, 「類別」: 「產品/服務」, 「ID」: 「114310318626160」, 「CREATED_TIME」: 「2011-06-15T22:26:18 + 0000」 }, { 「name」:「Junior's 535 Legging - Seaport Blue」, 「category」:「產品/服務」, 「id」: 「146626898728947」, 「created_time」:「2011-06-15T22:26:17 + 0000」 }' – Patrioticcow 2011-06-16 16:25:35

+0

我基本上得到:'name','id','category'和'date created' – Patrioticcow 2011-06-16 16:26:33

回答

2

檢索您喜歡的列表後我的代碼,然後需要通過他們去,獲得ID和開放達:

https://graph.facebook.com/ID

,這將給你有關,你喜歡那個特定項目的更多細節。例如,對於在數據中的第一項:

https://graph.facebook.com/114310318626160

{ 
    "id": "114310318626160", 
    "name": "Seam Legging - Shooting Star", 
    "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/50281_114310318626160_1881220_s.jpg", 
    "link": "http://r.levi.com/product/index.jsp?productId=4068748", 
    "likes": 115, 
    "category": "Product/service", 
    "website": "http://r.levi.com/product/index.jsp?productId=4068748", 
    "description": "Buy Seam Legging - Shooting Star - Top-stitched seams at the leg give this super-skinny fit just the right amount of detail - and slims its look, too. Its four pockets keep it comfortable." 
} 

從那裏,你可能已經猜到了link是實際鏈接到喜歡的項目。請注意,並非所有喜歡的項目是一些網站,但它們可以是例如Facebook頁面,例如:

https://graph.facebook.com/108905269168364

{ 
    "id": "108905269168364", 
    "name": "Conan O'Brien Presents: Team Coco", 
    "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/211060_108905269168364_696236_s.jpg", 
    "link": "http://www.facebook.com/teamcoco", 
    "likes": 1639441, 
    "category": "Tv show", 
    "website": "www.teamcoco.com\n", 
    "username": "teamcoco", 
    "description": "Welcome to the official Team Coco Facebook page! Yes, imagine for a moment, an alternate reality in which Conan O'Brien and his brethren can finally be experienced as they were always meant to be: shoehorned into the madcap blue and white webpage templates of Mr. Mark Zuckerberg! This is that reality! Let us live the adventure together, fearless Socialnauts!\n\nWhile this page is \"official\", it's here to be YOUR playground. Anyone can post here, so go crazy; we only ask that posts remain on-topic. If you're a purveyor of spam, smut, or unkindness, kindly die -- as you will be banned from this page. \n\nBy the way, you can also find Conan & Team Coco on other, similarly awesome corners of the internets:\n\nteamcoco.com\ntwitter.com/teamcoco\nteamcoco.tumbler.com\nyoutube.com/teamcoco\nfoursquare.com/teamcoco\nflickr.com/teamcoco\n\nToodles,\n\n- Your Pals \u0040 Team Coco", 
    "genre": "Comedy", 
    "network": "TBS", 
    "checkins": 3 
} 

但在這種情況下,link定義的URL Facebook頁面。