Changes

Jump to: navigation, search

Desktop Social Networking Integration

29 bytes added, 18:11, 14 October 2007
Code Walkthrough
<pre>
1. From sidebar.js the login command buttons calls startSession of the member service object (this._fbs)
2. 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.)
3. onCreateAuthToken open the login screen (authBrowser.xul)
</pre>
* Viewing friends code paths
<pre>
1. 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.
2. If there is no friends then sidebar.js calls its member function updateFriends which calls this._fbs.updateFriends.
3. 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.
4. onUpdateFriends is the even function used to populate new friends.
</pre>
* Viewing Messages
<pre>
* 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.
</pre>
1
edit

Navigation menu