Link element allows a developer to take advantage of application
life-cycle events defined by a container. Such events might be
application installs or uninstalls, or any other event in the day-to-day
life of a social application. The container supports these features by
sending relevant query parameters denoting the event to a URL endpoint specified within the
Link node may take the
following form under the
<ModulePrefs> <Link rel="event" href="http://www.mysite.com/ping.php" method="POST" /> <Link rel="event.addapp" href="http://www.mysite.com/add_app.php" /> <Link rel="event.removeapp" href="http://www.mysite.com/remove_app.php" /> </ModulePrefs>
As you can see in the preceding example, the
Link node has several associated attributes.
They are listed in Table 3-5.
Table 3-5. Link attributes
The string value that denotes the event being triggered. This value is required.
The URL to make a request to once the event has been triggered. This value is required.
The HTTP request method, either
Link node is specified
rel="event"), then any undefined life-cycle
event types will be sent through to that
href value by default. If there are one or more
Link nodes with a
"event.addapp"), then any ...