开发者

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:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜