|
Click on the time of a post in the News Feed or some someone's wall brings you to the link to that story. This feature can also be used to create a link to a Recent Activity item, but it is not shown in the interface.
Here's a method of implementation:
1. detect a profile page and activate feature, which the script already does
2. find all <div> elements with class UIRecentActivityStory
3. (steps 3-6 are performed with each element) get the data-ft attribute from these elements, process it as JSON data
4. from this data, take the fbid attribute
5. create the URL in this format: http://www.facebook.com/profile.php?id=[profile]&story_fbid=[fbid]
6. (back to the element reference) get the child img element with class UIImageBlock_Image (which is contained in a class UIImageBlock <div> element) and wrap it in an <a> element containing the link
|