Open main menu

CDOT Wiki β

Changes

Desktop Social Networking Integration

1,662 bytes added, 16:58, 14 October 2007
Code Walkthrough
* Microsummary.js (have not walkthrough)
* nsCoopFacebookService.js, nsCoopFacebookService.idl (with corresponding .xpt)
 
Function Paths:
* Logging In
** From sidebar.js the login command buttons calls startSession of the member service object (this._fbs)
** In the function startSession of the service object class (nsCoopFacebookService.js) it calls on another service object member function called createAuthToken; this function calls on the client member object (facebook-client.js) to post an AJAX request, so that the helper event function _onCreateAuthToken can be triggered to set the session information of the social service being accessed (facebook, twitter, etc.)
** onCreateAuthToken open the login screen (authBrowser.xul)
* Viewing friends code paths
** Upon successful session (this._fbs.sessionState of sidebar.js is active), sidebar.js calls a member function called buildpane which calls the function getFriends of the member service object. getFriends uses the member function currentUser to traverse through the coop database. The coop database is sqllite.
** If there is no friends then sidebar.js calls its member function updateFriends which calls this._fbs.updateFriends.
** nsFaceBookService.updateFriends is similar to the createAuthToken where it uses this._client to make an AJAX request in order to get a service information such as the case of friends. Information retrieved by the social service is retrieved as a json format to be parsed.
** onUpdateFriends is the even function used to populate new friends.
* Viewing Messages
** Once friends are populated the sidebar.js builds a Friends Pane. When the a user selects a specific friend from the list of friends the member function showFriend adds a button titled "more" to open a message box page.
==== Deliverable ====
1
edit