com.shephertz.app42.paas.sdk.android.social
Class SocialService

java.lang.Object
  extended by com.shephertz.app42.paas.sdk.android.social.SocialService

public class SocialService
extends java.lang.Object

Connect to the User's multiple social accounts. Also used to update the status individually or all at once for the linked social accounts.


Constructor Summary
SocialService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
          The constructor for the Service
 
Method Summary
 Social linkUserFacebookAccount(java.lang.String userName, java.lang.String accessToken)
          Links the User Facebook access credentials to the App User account.
 Social linkUserFacebookAccount(java.lang.String userName, java.lang.String appId, java.lang.String appSecret, java.lang.String accessToken)
          Links the User Facebook access credentials to the App User account.
 Social linkUserLinkedInAccount(java.lang.String userName, java.lang.String accessToken, java.lang.String accessTokenSecret)
          Links the User LinkedIn access credentials to the App User account.
 Social linkUserLinkedInAccount(java.lang.String userName, java.lang.String apiKey, java.lang.String secretKey, java.lang.String accessToken, java.lang.String accessTokenSecret)
          Links the User LinkedIn access credentials to the App User account.
 Social linkUserTwitterAccount(java.lang.String userName, java.lang.String accessToken, java.lang.String accessTokenSecret)
          Links the User Twitter access credentials to the App User account.
 Social linkUserTwitterAccount(java.lang.String userName, java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String accessToken, java.lang.String accessTokenSecret)
          Links the User Twitter access credentials to the App User account.
 Social updateFacebookStatus(java.lang.String userName, java.lang.String status)
          Updates the Facebook status of the specified user.
 Social updateLinkedInStatus(java.lang.String userName, java.lang.String status)
          Updates the LinkedIn status of the specified user.
 Social updateSocialStatusForAll(java.lang.String userName, java.lang.String status)
          Updates the status for all linked social accounts of the specified user.
 Social updateTwitterStatus(java.lang.String userName, java.lang.String status)
          Updates the Twitter status of the specified user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocialService

public SocialService(java.lang.String apiKey,
                     java.lang.String secretKey,
                     java.lang.String baseURL)
The constructor for the Service

Parameters:
apiKey -
secretKey -
baseURL -
Method Detail

linkUserFacebookAccount

public Social linkUserFacebookAccount(java.lang.String userName,
                                      java.lang.String appId,
                                      java.lang.String appSecret,
                                      java.lang.String accessToken)
                               throws App42Exception
Links the User Facebook access credentials to the App User account.

Parameters:
userName - - Name of the user whose Facebook account to be linked
appId - - Facebook App Id
appSecret - - Facebook App Secret
accessToken - - Facebook Access Token that has been received after authorisation
Throws:
App42Exception

linkUserFacebookAccount

public Social linkUserFacebookAccount(java.lang.String userName,
                                      java.lang.String accessToken)
                               throws App42Exception
Links the User Facebook access credentials to the App User account.

Parameters:
userName - - Name of the user whose Facebook account to be linked
accessToken - - Facebook Access Token that has been received after authorisation
Throws:
App42Exception

updateFacebookStatus

public Social updateFacebookStatus(java.lang.String userName,
                                   java.lang.String status)
                            throws App42Exception
Updates the Facebook status of the specified user.

Parameters:
userName - - Name of the user for whom the status needs to be updated
status - - status that has to be updated
Throws:
App42Exception

linkUserTwitterAccount

public Social linkUserTwitterAccount(java.lang.String userName,
                                     java.lang.String consumerKey,
                                     java.lang.String consumerSecret,
                                     java.lang.String accessToken,
                                     java.lang.String accessTokenSecret)
                              throws App42Exception
Links the User Twitter access credentials to the App User account.

Parameters:
userName - - Name of the user whose Twitter account to be linked
consumerKey - - Twitter App Consumer Key
consumerSecret - - Twitter App Consumer Secret
accessToken - - Twitter Access Token that has been received after authorisation
accessTokenSecret - - Twitter Access Token Secret that has been received after authorisation
Throws:
App42Exception

linkUserTwitterAccount

public Social linkUserTwitterAccount(java.lang.String userName,
                                     java.lang.String accessToken,
                                     java.lang.String accessTokenSecret)
                              throws App42Exception
Links the User Twitter access credentials to the App User account.

Parameters:
userName - - Name of the user whose Twitter account to be linked
accessToken - - Twitter Access Token that has been received after authorisation
accessTokenSecret - - Twitter Access Token Secret that has been received after authorisation
Throws:
App42Exception

updateTwitterStatus

public Social updateTwitterStatus(java.lang.String userName,
                                  java.lang.String status)
                           throws App42Exception
Updates the Twitter status of the specified user.

Parameters:
userName - - Name of the user for whom the status needs to be updated
status - - status that has to be updated
Throws:
App42Exception

linkUserLinkedInAccount

public Social linkUserLinkedInAccount(java.lang.String userName,
                                      java.lang.String apiKey,
                                      java.lang.String secretKey,
                                      java.lang.String accessToken,
                                      java.lang.String accessTokenSecret)
                               throws App42Exception
Links the User LinkedIn access credentials to the App User account.

Parameters:
userName - - Name of the user whose LinkedIn account to be linked
apiKey - - LinkedIn App API Key
secretKey - - LinkedIn App Secret Key
accessToken - - LinkedIn Access Token that has been received after authorisation
accessTokenSecret - - LinkedIn Access Token Secret that has been received after authorisation
Throws:
App42Exception

linkUserLinkedInAccount

public Social linkUserLinkedInAccount(java.lang.String userName,
                                      java.lang.String accessToken,
                                      java.lang.String accessTokenSecret)
                               throws App42Exception
Links the User LinkedIn access credentials to the App User account.

Parameters:
userName - - Name of the user whose LinkedIn account to be linked
accessToken - - LinkedIn Access Token that has been received after authorisation
accessTokenSecret - - LinkedIn Access Token Secret that has been received after authorisation
Throws:
App42Exception

updateLinkedInStatus

public Social updateLinkedInStatus(java.lang.String userName,
                                   java.lang.String status)
                            throws App42Exception
Updates the LinkedIn status of the specified user.

Parameters:
userName - - Name of the user for whom the status needs to be updated
status - - status that has to be updated
Throws:
App42Exception

updateSocialStatusForAll

public Social updateSocialStatusForAll(java.lang.String userName,
                                       java.lang.String status)
                                throws App42Exception
Updates the status for all linked social accounts of the specified user.

Parameters:
userName - - Name of the user for whom the status needs to be updated
status - - status that has to be updated
Throws:
App42Exception