// Fetch the user's friends $friends = json_decode(file_get_contents( 'https://graph.facebook.com/me/friends?access_token=' . $cookie['oauth_access_token']), true); $friend_ids = array_keys($friends); // Fetch all the content posted by this user's friends $result = mysql_query('SELECT * FROM content WHERE uid IN (' . implode($friend_ids, ',') . ')'); $friend_content = array(); while ($row = mysql_fetch_assoc($result)) { $friend_content[] = $row; }
Check out the Graph API for all the data available in Facebook Platform, and check out the Platform showcase for inspiration from other sites who have used Facebook for personalization.
For more details .. http://developers.facebook.com/docs/guides/web
0 comments:
Post a Comment