How can I use the Facebook NewsFeed function as a function in my PHP based application? For example, "X user uploaded a new photo, Z participating in the event." Getting all this data from different tables is consuming too many resources.
Thanks.
There are several ways to do this, but I would suggest this. Keep one “history” table that contains all the entries for each user, a timestamp and description of the action along with flags (or predefined keys) for what type of action. This will allow you to selectively query one table for certain types of actions and for a set period of time to display. However, with a large number of users, this table will grow rapidly, so you can consider cleaning up old data, which, as you know, will no longer be used later. Pay close attention to indexes to quickly support queries and consider using query caching, as you are likely to often generate the same results.
, , . , temp_history , CRON .
, -. . , php, .
, x y, z, a b. y, z, a b . , . y . , zoozoo. zoozoo .
, , Activity_USER_ID, , , , .
, 1,2,3, , , , .
: php, . jQuery Ajax , , facebook , php- json .
.
, , event_MM_DD_YYYY, , .
10 20 30 .
, :)
, : .
, " ", - .
( , Symfony). , , , . . , .
facebook, , "push" ajax- , .
Xcache, Apc .