cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
74
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: James Maudlin on 20-05-2011 10:24:00 AM
This post aims at explaining how the micropost feature works.

Microblog allows the user to create short (400 characters or less, 140
for twitter posts) status messages that are then displayed in their
followers¿ activities feeds.

The user can also send directed messages using @, and tag the message using #. 

The microblog widget also appears in the activities feed on people¿s
profile pages - if a message is entered here it is a ¿wall post¿ to that
person, in which case it shows up in the wall owner activities feed and
the wall owner¿s followers¿ activities feeds. 

Users also have the option of posting to twitter.  In addition, twitter
is polled for a admin configured hashtag and pulls in tweets with that
hash as microblogs.

Format
User mentions

Users from the personal address book can be mentioned in a micropost.
Mentioning a user will cause the micropost to appear in the mentioned
user's watch list. Mentions in the WebEx Social web client look like: @John Doe. This is represented by the following string:

@[uid, fullname, profileUrl] where:

uid is an integer and a valid userid

fullname is a string
profileUrl is a string

When the client submits a micropost with a user mention, the server
will discard and regenerate everything after the userid. So you can send
only @ and it should work.

Hashtags

Hashtags are a way to tag a micropost within the content like twitter
does. Unlike twitter multi word tags are supported although not exposed
at the day of this writing. Hashtags in the WebEx Social web client look like: #word1 word2. This is represented by the following string:

#["word1 word2"]

Links

Urls entered by the user are converted to links through a regexp by John Gruber. They are stored on the server using John Gruber's Markdown syntax. For instance, if the user types www.cisco.com  the editor will convert that to a link to http://www.cisco.com which will be represented by:

(www.cisco.com)[http://www.cisco.com]

Client-side

Service

com.cisco.ecp.service.MicroPost exposes:
<table style="background-color: #ffffff; border-collapse: collapse; width: 90%; border: 1px solid #8e8e8e;" border="1" cellspacing="0" cellpadding="10" align="left">
<tbody>
<tr>
<td style="margin: 0px; padding: 10px;">
dojo.Deferred</td>
<td style="margin: 0px; padding: 10px;">

create(MicroPost microPost, String destinationId, String destinationType)

Wrapper to Liferay.Service.Post.MicroPost.addMicroPost

<td style="margin: 0px; padding: 10px;">
dojo.Deferred</td>
<td style="margin: 0px; padding: 10px;">

fetchLatest(String destinationId, String destinationType)

Wrapper to Liferay.Service.Post.MicroPost.getLatestMicroPost

<td style="margin: 0px; padding: 10px;">
dojo.Deferred</td>
<td style="margin: 0px; padding: 10px;">

update(int microPostId, MicroPost microPost, String destinationId, String destinationType)

Wrapper to Liferay.Service.Post.MicroPost.editMicroPost

<td style="margin: 0px; padding: 10px;">
String</td>
<td style="margin: 0px; padding: 10px;">

getTopic(String destinationId, String destinationType)

Gets the topic string for a specified destinationId and destinationType


Widgets

com.cisco.ecp.sharebox.ShareBox

Base widget that is displayed in the activity portlet, does not have twitter capabilities. 

com.cisco.ecp.microblog.Microblog

Inherits ShareBox widget and adds twitter capabilities. This is the
widget used in the banner and and the the "My view" activities portlet.

Server-side
Database tables used
<table style="background-color: #ffffff; border-collapse: collapse; width: 1000px; border: 1px solid #8e8e8e;" border="1" cellspacing="0" cellpadding="10">
<tbody>

<td style="margin: 0px; padding: 10px;">
PostMapping</td>
<td style="margin: 0px; padding: 10px;">
Stores post-specific metadata such as author, createdate, last version, type (MicroPost or WallPost)</td>

<td style="margin: 0px; padding: 10px;">
PostVersion</td>
<td style="margin: 0px; padding: 10px;">
Stores the actual content of each version of the micropost, along with attachments, links, trackbacks</td>

<td style="margin: 0px; padding: 10px;">
PostsUsers</td>
<td style="margin: 0px; padding: 10px;">
For @ mentions and wall posts, a direct share permission for the recipient is created in this table</td>

<td style="margin: 0px; padding: 10px;">
PostUserData</td>
<td style="margin: 0px; padding: 10px;">
Stores the last time a user viewed a micropost, and whether a micropost
should show up on the watchlist (i.e. @ mentions and wall posts)</td>

<td style="margin: 0px; padding: 10px;">
PostsFeeds</td>
<td style="margin: 0px; padding: 10px;">
Twitter posts have a unique id stored here.  This is to ensure that the
twitter hashtag polling mechanism only pulls in each tweet from twitter
exactly once.
<td style="margin: 0px; padding: 10px;">
MBDiscussion</td>
<td style="margin: 0px; padding: 10px;">
Each micropost has a 'discussion' that holds the comments.  This table
maps the discussion to the threads (there should be just one thread for
microposts)
<td style="margin: 0px; padding: 10px;">
MBThread</td>
<td style="margin: 0px; padding: 10px;">
A thread that holds all the comments for a micropost.

<td style="margin: 0px; padding: 10px;">
MBMessage</td>
<td style="margin: 0px; padding: 10px;">
Each comment on a micropost is stored here.</td>


Dependencies

A proxy needs to be setup for communication with twitter, if that feature is enabled.

Protocols

OAuth is used to authenticate a user with twitter
 
Troubleshooting information

Log Category: Post

Log Level: normal operation - Error.  For troubleshooting - Trace/Debug

Log location: /opt/ramfs/logs/WebEx Social*.log

Log example:

Micropost calling the addPost api to add the micropost:



2010-12-09 22:23:23,365 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
addPost being requested for userId:10321, postId:-1

2010-12-09 22:23:23,366 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
Categories_Links updated:false

2010-12-09 22:23:23,367 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
Categories_Links:{"categories":[]}

2010-12-09 22:23:23,382 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
addPermission being requested for postId:5000006

2010-12-09 22:23:23,391 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
Non Video post got created

2010-12-09 22:23:23,394 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
Trackbacks updated:false

2010-12-09 22:23:23,395 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
Categories_Links:

2010-12-09 22:23:23,395 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
There are not trackbacks to refresh

2010-12-09 22:23:23,396 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain]
getGroupsWithViewPermissionOnPost called - query string is:   SELECT
{PostsGroups.*} FROM PostsGroups INNER JOIN PostMapping ON
PostsGroups.postId = PostMapping.postId WHERE PostMapping.postId = ? AND
(PostMapping.state IN (0,3,4)) AND PostsGroups.viewPermission = 1   

In this particular case, there were no directed userids:



2010-12-09 22:23:23,398 DEBUG [POST:48] -  -
[7056BFE635AD9A3E8485C363DB995C00.WebEx Socialjvm1] - [localhost.localdomain] in
plsi directed userids is0
 

Commonly seen issues:

Issue 1

Issue:  @ or # or links don't work</li>

Solution: A space must be entered by the user after the @, #, or link content.  Otherwise, the text won't get 'linkified'
Health/Sanity Check

Verify basic functionality:

Login and create a micropost by entering text into the bubble and clicking share.</li>

A toast should appear that shows success</li>

Verify twitter functionality:

Login and enter test into the micropost area</li>

Click the twitter icon.  Authenticate to twitter account through OAuth.

Click the share button
Verify that the tweet appears in twitter.

Subject: RE: Microposts
Replied by: ROD TAGUCHI on 07-06-2011 01:08:53 PM
James, is SSL capable on all versions of WebEx Social?  /Rod Taguchi

Subject: RE: Microposts
Replied by: James Maudlin on 07-06-2011 02:09:25 PM
Rod - It is not supported out of box.

Partner was using an ACE like switch to terminate SSL.  It simply converts HTTP to HTTPS.
With some external components, it can be made to work.

Hope that helps.  Thanks for participating in the Forum!!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links