0

I have a Digg style site, currently each member has a profile page where they add links to their projects and social networking profiles.

I am trying to implement a feature that allows the member to display the last "X" number of status updates to their Facebook wall.

I have been going through the Facebook API FAQs, but unclear on how to best implement this.

Does anyone know a good starting point for writing the API call or where I should look for examples?

My site currently runs on PHP.

ifaour
  • 38,035
  • 12
  • 72
  • 79
Darrell
  • 37
  • 3
  • possible duplicate of [How do I ask for facebook permissions in PHP?](http://stackoverflow.com/questions/5050201/how-do-i-ask-for-facebook-permissions-in-php) – ifaour Feb 20 '11 at 21:03
  • Also this [answer](http://stackoverflow.com/questions/4814432/facebook-sharing-graph-api/4816134#4816134) is worth reading. – ifaour Feb 20 '11 at 21:05
  • Thanks for the links, I just want to allow my members to enter their Facebook ID into a field I will save in my database, then when their profile page on my site is visited, have a script call to facebook using the stored Facebook ID get the last 5 wall posts of given user. – Darrell Feb 21 '11 at 00:07
  • Ah, you need to read not publish, okay I'm going to answer now. – ifaour Feb 21 '11 at 09:25

1 Answers1

0

Here's a set of point to get you started:

  1. Create an application
  2. Download the Facebook PHP-SDK
  3. Acquire the read_stream,offline_access permissions (more about this here)
  4. Save the user id AND the access_token to your DB.
  5. Next time you want to retrieve the user's wall posts use:

    $feed = $facebook->api("/PROFILE_ID/feed", "GET", array("access_token" => "XXXX"));
    
  6. Always try your Facebook application locally before implementing it on a live website (see link on point 3).
Community
  • 1
  • 1
ifaour
  • 38,035
  • 12
  • 72
  • 79