Add Facebook status feed to profile page of site members
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 FAQ开发者_StackOverflows, 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.
Here's a set of point to get you started:
- Create an application
- Download the Facebook PHP-SDK
- Acquire the
read_stream,offline_access
permissions (more about this here) - Save the user id AND the
access_token
to your DB. Next time you want to retrieve the user's wall posts use:
$feed = $facebook->api("/PROFILE_ID/feed", "GET", array("access_token" => "XXXX"));
- Always try your Facebook application locally before implementing it on a live website (see link on point 3).
精彩评论