i’m trying to make a simple android apps that read live feed from a socialengine site
how can i do some actions:
- authenticate users
- read notifications
- read messages
- display updates
is there a special API i may use
sorry if the question is not clear
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All the Activity feed data can be found in your database in the engine4_activity* tables. I’m afraid our support staff doesn’t have any diagrams or documents that can be shared at this time. Our staff doesn’t not usually provide customization assistance as that is beyond the scope of our support service (http://support.socialengine.com/questions/152/SocialEngine-Requirements). I will provide a brief descriptions of how to use the Authorization and Activity, however more detailed information would need to be inferred by reviewing SocialEngine’s code. As a note, while we don’t compile documentation for SocialEngine, our developers have used the PHPDocumentor style syntax through out our code and you can use an IDE like Neatbeans (http://netbeans.org/) to quickly access that information.
Authorization
SocialEngine has a few controller action helper classes that are used for query authorization within action controllers:
For the most part the only ones you’ll concern yourself with are these:
A good example of how these helpers are used can be found in the Album_AlbumController class:
application/modules/Album/controllers/AlbumController.php
The code in the init function simply set’s the requirements for accessing the page, and then within the editAction function, checks are ran against the authorization data. The requireSubject and requireUser helpers are pretty straight forward:
the above example gets done in the init function
The requireAuth helper is a little less straight forward. I’ll omit most of the abstract inner-workings for the sake of brevity. In the end, the helper points to the Authorization_Api_Core::isAllowed function:
application/modules/Authorization/Core/Api.php
The $resource and $role objects that the function expects are instances of Zend_Db_Table_Row which is termed Models within SocialEngine and are expected to be located in the Models directory of a module. When the isAllowed function is invoked, the authorization api will query the database against the engine4_authorization_allow, engine4_authorization_levels and engine4_authorization_permissions tables.
created by SocialEngine out of the box, as well as custom member
levels created from the Manage > Member Levels section in the admin
panel.
default and admin specified permission handling, such as member
level settings.
for individual objects. For example information about who is able to
view a photo album would be placed there. Whether or not a
engine4_authorization_allow.role_id (maps to item id for a model) is
allowed to access the engine4_authorization_allow.resource_id (maps
to item id for a model) is determined by the
engine4_authorization_allow.value column which should contain a
number 0-5.
application/modules/Authorization/Api/Core.php
0) Not allowed to access the linked resource. This is the same as the row not existing in the allow table
1) Allowed too access the linked resource
2) Allowed to access and moderate resources (ie. Superadmin, Admin and Moderator member level)
3-5) Get ignored as disallowed. These expect some custom logic in order to handle authorization appropriately.
Activity Feed
Posting to the activity feed is actually pretty simple. It’s more or less a single function call:
The first line in the above example uses SocialEngines Engine_Api class to load the Activity_Model_DbTable_Actions class (application/modules/Activity/Model/DbTable/Actions.php). The 2nd line is where the action is activity feed item is actually created.
Core_Model_Item_Abstract (a SocialEngine model).
table
$body will be stored the engine4_activity_actions.body column in
the database. This is the actual message for the activity. For
example, when a use adds a new profile photo, the body column would
be set to:
{item:$subject} added a new profile photoWhen the activity content is assembled, {item:$subject} will be
replaced with the user’s display name
$params will be serialized and stored in the
engine4_activity_actions.params column. The data in the params
column will passed on when assembling the activity description:
application/modules/Activity/Model/Action.php