简体   繁体   中英

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 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.

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM