1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Retrieve most 'liked' pages..

Discussion in 'Facebook API' started by Chuckun, Jul 8, 2010.

  1. #1
    Hi all!

    I'm only just starting to use Facebook features and so far I've just been using iFrames for like buttons but it's totally impractical.

    I was wondering if there's any way I can actually retrieve the most liked pages from my domain?

    Is there any way to do this? If so how? I'd need to be told in simple terms as I'm a newbie to the FB API's..

    Thanks a lot!
    Chuckun
     
    Chuckun, Jul 8, 2010 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    digitalpoint, Jul 8, 2010 IP
  3. Chuckun

    Chuckun Well-Known Member

    Messages:
    1,161
    Likes Received:
    60
    Best Answers:
    2
    Trophy Points:
    150
    #3
    Awesome, thanks a lot Shawn!

    I hope I can find something - it'd make my life so much easier if I could!

    Just to be sure we're on the same wavelength so I don't get too confused, i'm talking about a similar scenario to you trying to integrate a "most liked threads" section on here determined by the facebook like plugin..

    Chuckun
     
    Last edited: Jul 8, 2010
    Chuckun, Jul 8, 2010 IP
  4. Chuckun

    Chuckun Well-Known Member

    Messages:
    1,161
    Likes Received:
    60
    Best Answers:
    2
    Trophy Points:
    150
    #4
    Hmmm.. I'm still not totally sure if this is possible..

    I'm starting to really wish I'd paid attention to the FB APIs from the beginning.. Looks like I'm gonna have to fully understand the usage of the Graph API alongside FQL before I can get to these depths.. I'll stick to my on-site data for now and pull the most viewed pages instead of most liked until I can get my head around this..

    However if anybody figures out how to do this PLEASE let me know!

    Thanks a bunch,
    Chuckun
     
    Chuckun, Jul 9, 2010 IP
  5. inet

    inet Well-Known Member

    Messages:
    706
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    163
    #5
    I am actually investigating this also myself now. Looking into something like a facebook -> tweetmeme kind of layout that can display most liked articles/blog post/etc. I think however it is only possible by adding an extra line of code to the original fb script to call home [your site] but who would be willing to go through that hassle on your behalf and you would leave out a lot of sites that would not use it.
     
    inet, Jul 17, 2010 IP
  6. Chuckun

    Chuckun Well-Known Member

    Messages:
    1,161
    Likes Received:
    60
    Best Answers:
    2
    Trophy Points:
    150
    #6
    I've been looking into making an FQL query to search the link_stat table where url= wildcard of my url..

    FQL doesn't allow LIKE or wildcards.. But there may be a way using PHP but I'm unsure as of yet.. I've not had much time since my last post!
     
    Chuckun, Jul 17, 2010 IP
  7. DuValEnterprises

    DuValEnterprises Peon

    Messages:
    865
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes, this can absolutely be done, here are two different ways to do it:

    1. You can access the site's object in the Graph and get the current "Fan count". i.e. http://graph.facebook.com/http://google.com. Note that you will need an oauth token to do this. This is definitely the most accurate way of getting a page's Likes.

    2. You can also use the javascript SDK to detect when a user clicks the Like button and then make an ajax call in the background to a php page that adds to a counter or does whatever you want it to. You can also detect when a user Unlikes a page too.
     
    DuValEnterprises, Jul 26, 2010 IP
    Chuckun likes this.
  8. Chuckun

    Chuckun Well-Known Member

    Messages:
    1,161
    Likes Received:
    60
    Best Answers:
    2
    Trophy Points:
    150
    #8
    Thanks a lot DuVal!

    You just gave me a brainwave!! Thank you! +REP

    Chuckun
     
    Chuckun, Jul 26, 2010 IP
  9. DuValEnterprises

    DuValEnterprises Peon

    Messages:
    865
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #9
    My pleasure :)
     
    DuValEnterprises, Aug 1, 2010 IP
  10. rupeshkumar170

    rupeshkumar170 Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    'm talking about a similar scenario to you trying to integrate a "most liked threads" section on here determined by the facebook like plugin..
     
    rupeshkumar170, Aug 28, 2010 IP