Social Integration Service

This module enables you to integrate your App with social networking sites such as Facebook, Twitter and LinkedIn allows App users to update the status on such social networking sites.

Import Statement

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
import com.shephertz.app42.paas.sdk.android.App42API;
import com.shephertz.app42.paas.sdk.android.App42Response;
import com.shephertz.app42.paas.sdk.android.App42Exception;
import com.shephertz.app42.paas.sdk.android.App42BadParameterException;
import com.shephertz.app42.paas.sdk.android.App42NotFoundException;
import com.shephertz.app42.paas.sdk.android.social.Social;
import com.shephertz.app42.paas.sdk.android.social.SocialService;
using com.shephertz.app42.paas.sdk.windows;  
using com.shephertz.app42.paas.sdk.windows.social;   
#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"   
import com.shephertz.app42.paas.sdk.jme.App42API;
import com.shephertz.app42.paas.sdk.jme.App42Response;
import com.shephertz.app42.paas.sdk.jme.App42Exception;
import com.shephertz.app42.paas.sdk.jme.App42BadParameterException;
import com.shephertz.app42.paas.sdk.jme.App42NotFoundException;
import com.shephertz.app42.paas.sdk.jme.social.Social;
import com.shephertz.app42.paas.sdk.jme.social.SocialService;
import com.shephertz.app42.paas.sdk.java.App42API;
import com.shephertz.app42.paas.sdk.java.App42Response;
import com.shephertz.app42.paas.sdk.java.App42Exception;
import com.shephertz.app42.paas.sdk.java.App42BadParameterException;
import com.shephertz.app42.paas.sdk.java.App42NotFoundException;
import com.shephertz.app42.paas.sdk.java.social.Social;
import com.shephertz.app42.paas.sdk.java.social.SocialService;
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.social;
<script type="text/javascript" src="App42-all-x.x.x.min.js">
local App42API = require("App42-Lua-API.App42API")
#include "App42API.h"
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.social;  
 
include_once '../App42Response.php';  
include_once '../App42Exception.php';  
include_once '../App42BadParameterException.php';  
include_once '../App42NotFoundException.php'; 
include_once '../SocialService.php';
include_once '../App42Log.php';   
#include "App42API.h"
require 'App42_Ruby_API'
import com.shephertz.app42.paas.sdk.as3.App42API;
import com.shephertz.app42.paas.sdk.as3.App42Response;
import com.shephertz.app42.paas.sdk.as3.App42Exception;
import com.shephertz.app42.paas.sdk.as3.App42BadParameterException;
import com.shephertz.app42.paas.sdk.as3.App42NotFoundException;
import com.shephertz.app42.paas.sdk.as3.social.Social;
import com.shephertz.app42.paas.sdk.as3.social.SocialService;
Not Available

Initialize

In order to use various the functions available in a specific API, a developer has to initialize with App42API by passing the apiKey and secretKey which will be created after the app creation from AppHQ dashboard.

Required Parameters

apiKey - The Application key given when the application was created. secretKey - The secret key corresponding to the application key given when the application was created.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
App42API.initialize("API_KEY","SECRET_KEY");
App42API.initialize("API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
App42.initialize("API_KEY","SECRET_KEY");
App42API:initialize("API_KEY","SECRET_KEY")
App42API::Initialize("API_KEY", "SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
App42API::initialize("API_KEY","SECRET_KEY");
App42API::Initialize("API_KEY", "SECRET_KEY");
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
App42API.initialize("API_KEY","SECRET_KEY");
Not Available

Build Service

After initialization, developer needs to call the buildXXXService method on App42API to get the instance of the particular API that you wish to build. For example, To build an instance of Social Service, buildSocialService() method needs to be called.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
SocialService socialService = App42API.buildSocialService(); 
SocialService socialService = App42API.BuildSocialService();  
SocialService *socialService = [App42API buildSocialService]; 
SocialService socialService = App42API.buildSocialService(); 
SocialService socialService = App42API.buildSocialService(); 
SocialService socialService = App42API.BuildSocialService(); 
var socialService  = new App42Social();
local socialService  = App42API:buildSocialService()
SocialService *socialService = App42API::BuildSocialService();
SocialService socialService = App42API.BuildSocialService(); 
$socialService = App42API::buildSocialService();
SocialService *socialService = App42API::BuildSocialService();
social_service = api.build_social_service()
var socialService:SocialService = App42API.buildSocialService(); 
Not Available

Link User Facebook Account

Links the User Facebook access credentials to the App User account.

Required Parameters

userName - Name of the user whose Facebook account to be linked. accessToken - Facebook Access Token that has been received after authorization.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>";
socialService.linkUserFacebookAccount(userName, accessToken, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is " + social.getUserName());  
	System.out.println("facebookAccessToken is " + social.getFacebookAccessToken()); 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});       
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>";
socialService.LinkUserFacebookAccount(userName, accessToken, new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("fb Access Token is" + social.GetFacebookAccessToken()); 
		String jsonResponse = social.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
	
NSString *userName = @"Nick";                  
NSString *accessToken = @"<Enter Facebook Access Token>";
Social *social = [socialService linkUserFacebookAccount:userName accessToken:accessToken); 
NSLog(@"userName is %@",social.userName);
NSLog(@"FacebookAccessToken is %@",social.facebookAccessToken);
NSString *jsonResponse = [social toString];
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>";
Social social = socialService.linkUserFacebookAccount(userName, accessToken); 
System.out.println("userName is " + social.getUserName());
System.out.println("fb Access Token is " + social.getFacebookAccessToken());
String jsonResponse = social.toString();    
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>";
Social social = socialService.linkUserFacebookAccount(userName, accessToken); 
System.out.println("userName is " + social.getUserName());  
System.out.println("facebookAccessToken is " + social.getFacebookAccessToken()); 
String jsonResponse = social.toString();    
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.LinkUserFacebookAccount(userName, accessToken, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("fb Access Token is" + social.GetFacebookAccessToken());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",
accessToken = "<Enter Facebook Access Token>",
social ;
socialService.linkUserFacebookAccount(userName, accessToken,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("fb Access Token is " + social.facebookAccessToken)
	},
	error: function(error) {
	}
});
local userName = "Nick"
local accessToken = "<Enter Facebook Access Token>"
local App42CallBack = {}
socialService:linkUserFacebookAccount(userName, accessToken, App42CallBack)
function App42CallBack:onSuccess(object)
	print("userName is " ..object:getUserName());    
	print("facebookAccessToken is "..object:getFacebookAccessToken());  
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* accessToken = "<Enter Facebook Access Token>";
socialService->LinkUserFacebookAccount(userName, accessToken, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nFBAccessToken=%s",app42SocialResponse->social.getFacebookAccessToken().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>";
Social social = socialService.LinkUserFacebookAccount(userName, accessToken); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("fb Access Token is" + social.GetFacebookAccessToken()); 
String jsonResponse = social.ToString();         
$userName = "Nick";
$accessToken = "<Enter Facebook Access Token>";
$social = $socialService->linkUserFacebookAccount($userName, $accessToken); 
print_r("userName is" . $social->getUserName());
print_r("fb Access Token is" . $social->getFacebookAccessToken());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* accessToken = "<Enter Facebook Access Token>";
socialService->LinkUserFacebookAccount(userName, accessToken, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nFBAccessToken=%s",app42SocialResponse->social.getFacebookAccessToken().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";						
facebook_access_token = "<Enter Facebook Access Token>";
social = social_service.link_user_facebook_account(user_name, facebook_access_token); 
puts "userName is #{social.user_name}";
puts "facebookAccessToken is #{social.facebook_access_token}";
json_response = social.to_s();
var userName:String = "Nick";                  
var accessToken:String = "<Enter Facebook Access Token>";
socialService.linkUserFacebookAccount(userName,accessToken, new callback());  
public class callback implements App42CallBack  
{  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("fb Access Token is " + social.getFacebookAccessToken());
	} 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}   
}  
Not Available

Link User Facebook Account With App Credentials

Links the User Facebook access credentials to the App User account.

Required Parameters

userName - Name of the user whose Facebook account to be linked. accessToken - Facebook Access Token that has been received after authorization. appId - Facebook App Id. appSecret - Facebook App Secret.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>"; 
String appId = "FACEBOOK APP ID";
String appSecret = "FACEBOOK APP SECRET";  
socialService.linkUserFacebookAccount(userName, accessToken, appId, appSecret, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println(social);
	System.out.println("userName is " + social.getUserName());  
	System.out.println("facebookAccessToken is " + social.getFacebookAccessToken());  
	System.out.println("facebookAppId is " + social.getFacebookAppId());  
	System.out.println("facebookAppSecret is " + social.getFacebookAppSecret());  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});       
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>"; 
String appId = "FACEBOOK APP ID";
String appSecret = "FACEBOOK APP SECRET";  
socialService.LinkUserFacebookAccount(userName, accessToken,appId,appSecret, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("fb Access Token is" + social.GetFacebookAccessToken()); 
		String jsonResponse = social.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
	
NSString *userName = @"Nick";                  
NSString *accessToken = @"<Enter Facebook Access Token>"; 
NSString *appId = @"FACEBOOK APP ID";
NSString *appSecret = @"FACEBOOK APP SECRET";  
Social *social = [socialService linkUserFacebookAccount:userName appId:appId appSecret:appSecret accessToken:accessToken); 
NSLog(@"userName is %@",social.userName);
NSLog(@"FacebookAccessToken is %@",social.facebookAccessToken);
NSString *jsonResponse = [social toString];
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>"; 
String appId = "FACEBOOK APP ID";
String appSecret = "FACEBOOK APP SECRET";  
Social social = socialService.linkUserFacebookAccount(userName, accessToken,appId,appSecret); 
System.out.println("userName is " + social.getUserName());
System.out.println("fb Access Token is " + social.getFacebookAccessToken());
String jsonResponse = social.toString();    
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>"; 
String appId = "FACEBOOK APP ID";
String appSecret = "FACEBOOK APP SECRET";  
Social social = socialService.linkUserFacebookAccount(userName, accessToken,appId,appSecret); 
System.out.println(social);
System.out.println("userName is " + social.getUserName());  
System.out.println("facebookAccessToken is " + social.getFacebookAccessToken());  
System.out.println("facebookAppId is " + social.getFacebookAppId());  
System.out.println("facebookAppSecret is " + social.getFacebookAppSecret());  
String jsonResponse = social.toString();    
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>"; 
String appId = "FACEBOOK APP ID";
String appSecret = "FACEBOOK APP SECRET";  
App42Log.SetDebug(true);		//Print output in your editor console
socialService.LinkUserFacebookAccount(userName, accessToken, appId, appSecret, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("fb Access Token is" + social.GetFacebookAccessToken());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",
accessToken = "<Enter Facebook Access Token>", 
appId = "FACEBOOK APP ID",
appSecret = "FACEBOOK APP SECRET",
social ;
socialService.linkUserFacebookAccountWithCredentials(userName, accessToken,appId,appSecret,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("fb Access Token is " + social.facebookAccessToken)
	},
	error: function(error) {
	}
});
Not Available
const char* userName = "Nick";
const char* accessToken = "<Enter Facebook Access Token>";
const char* appId = "FACEBOOK APP ID";
const char* appSecret = "FACEBOOK APP SECRET";
socialService->LinkUserFacebookAccount(userName, accessToken, appId, appSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nFBAccessToken=%s",app42SocialResponse->social.getFacebookAccessToken().c_str());
        printf("\nFBAppId=%s",app42SocialResponse->social.getFacebookAppId().c_str());
        printf("\nFBAppSecret=%s",app42SocialResponse->social.getFacebookAppSecret().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                  
String accessToken = "<Enter Facebook Access Token>"; 
String appId = "FACEBOOK APP ID";
String appSecret = "FACEBOOK APP SECRET";  
Social social = socialService.LinkUserFacebookAccount(userName, accessToken,appId,appSecret); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("fb Access Token is" + social.GetFacebookAccessToken()); 
String jsonResponse = social.ToString();         
$userName = "Nick";
$accessToken = "<Enter Facebook Access Token>" ;
$appId = "FACEBOOK APP ID";
$appSecret = "FACEBOOK APP SECRET";  
$social = $socialService->linkUserFacebookAccount($userName, $accessToken,$appId,$appSecret); 
print_r("userName is :" . $social->getUserName());
print_r("FacebookAppId is :" . $social->getFacebookAppId());
print_r("FacebookAppSecret is:" . $social->getFacebookAppSecret());
print_r("FacebookAccessToken is:" . $social->getFacebookAccessToken());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* accessToken = "<Enter Facebook Access Token>";
const char* appId = "FACEBOOK APP ID";
const char* appSecret = "FACEBOOK APP SECRET";
socialService->LinkUserFacebookAccount(userName, accessToken, appId, appSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nFBAccessToken=%s",app42SocialResponse->social.getFacebookAccessToken().c_str());
        printf("\nFBAppId=%s",app42SocialResponse->social.getFacebookAppId().c_str());
        printf("\nFBAppSecret=%s",app42SocialResponse->social.getFacebookAppSecret().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";
facebook_access_token = "<Enter Facebook Access Token>";						
facebook_app_id = "FACEBOOK APP ID";
facebook_app_secret = "FACEBOOK APP SECRET";
social = social_service.link_user_facebook_account_with_token(user_name, facebook_access_token, facebook_app_id, facebook_app_secret);
puts "userName is #{social.user_name}";
puts "facebookAccessToken is #{social.facebook_access_token}";
json_response = social.to_s();
Not Available
Not Available

Update Facebook Status

Updates the Facebook status of the specified user.

Required Parameters

userName - Name of the user for whom the status needs to be updated. status - Status that has to be updated.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String status = "Nick is using the App42 API";
socialService.updateFacebookStatus(userName, status, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is " + social.getUserName());  
	System.out.println("status is " + social.getStatus()); 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});       
String userName = "Nick";                  
String status = "Nick is using the App42 API";
socialService.UpdateFacebookStatus(userName, status, new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("status is" + social.GetStatus()); 
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
	
NSString *userName = @"Nick";                 
NSString *status = @"Nick is using the App42 API";
Social *social = [socialService updateFacebookStatus:userName status:status); 
NSLog(@"userName is %@",social.userName);
NSLog(@"status is %@",social.status);
NSString *jsonResponse = [social toString];
String userName = "Nick";                       
String status = "Nick is using the App42 API";
Social social = socialService.updateFacebookStatus(userName, status); 
System.out.println("userName is " + social.getUserName());
System.out.println("fb Access Token is " + social.getStatus());
String jsonResponse = social.toString();    
String userName = "Nick";                 
String status = "Nick is using the App42 API";
Social social = socialService.updateFacebookStatus(userName, status); 
System.out.println("userName is " + social.getUserName());  
System.out.println("status is " + social.getStatus()); 
String jsonResponse = social.toString();    
String userName = "Nick";                
String status = "Nick is using the App42 API";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.UpdateFacebookStatus(userName, status, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("status is" + social.GetStatus()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",              
status = "Nick is using the App42 API",
social ;
socialService.updateFacebookStatus(userName, status,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("status is " + social.status)
	},
	error: function(error) {
	}
});
local userName = "Nick"
local status = "Nick is using the App42 API"
local App42CallBack = {}
socialService:updateFacebookStatus(userName, status,App42CallBack)
function App42CallBack:onSuccess(object)
	print("userName is " ..object:getUserName()); 
	print("status is " ..object:getStatus());     
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateFacebookStatus(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nStatus=%s",app42SocialResponse->social.getStatus().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                
String status = "Nick is using the App42 API";
Social social = socialService.UpdateFacebookStatus(userName, status); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("status is" + social.GetStatus()); 
String jsonResponse = social.ToString();         
$userName = "Nick";              
$status = "Nick is using the App42 API";
$social = $socialService->updateFacebookStatus($userName, $status); 
Print_r("userName is" . $social->getUserName());
Print_r("status is" . $social->getStatus());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateFacebookStatus(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nStatus=%s",app42SocialResponse->social.getStatus().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";
status = "Nick is using the App42 API";					
social = social_service.update_facebook_status(user_name, status);
puts "userName is #{social.user_name}";
json_response = social.to_s();
var userName:String = "Nick";                  
var status:String = "Nick is using the App42 API";
socialService.updateFacebookStatus(userName,status, new callback());  
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("status is " + social.getStatus());
	}  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	} 
}  
Not Available

Get Facebook Friends From Link User

This function returns a list of Facebook friends of the specified user by accessing the Facebook account. User first have to link his account to facebook.

Required Parameters

userName - Name of the user whose Facebook friends has to be retrieve.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
socialService.getFacebookFriendsFromLinkUser(userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is " + social.getUserName());
	for(int i =0; i < social.getFriendList().size();i++)
	{
		System.out.println("Installed is : " + social.getFriendList().get(i).getInstalled());
		System.out.println("Id is : " + social.getFriendList().get(i).getId());
		System.out.println("Picture is :" + social.getFriendList().get(i).getPicture());
		System.out.println("Name is : " + social.getFriendList().get(i).getName());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});     
String userName = "Nick";
socialService.GetFacebookFriendsFromLinkUser(userName, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName());
		for(int i =0; i < social.GetFriendList().Count;i++)
		{
			Console.WriteLine("Installed is : " + social.GetFriendList()[i].GetInstalled());
			Console.WriteLine("Id is : " + social.GetFriendList()[i].GetId());
			Console.WriteLine("Name is : " + social.GetFriendList()[i].GetName());
		}     
	} 
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}   
}  
	
NSString *userName = @"Nick";
Social *social = [socialService getFacebookFriendsFromLinkUser:userName];
NSLog(@"UserName = %@",social.userName);
for (Friends *friend in social.friendsList)
{
    NSLog(@"Name=%@",friend.name);
    NSLog(@"Picture=%@",friend.picture);
    NSLog(@"Id=%@",friend.friendId);
    NSLog(@"Installed=%d",friend.installed);
}

String userName = "Nick";
Social social = socialService.getFacebookFriendsFromLinkUser(userName); 
System.out.println("userName is " + social.getUserName());
Vector friendList = social.getFriendList();   
for(int i=0;i < friendList.size();i++)  
{ 
	Social.Friends friend = (Social.Friends)friendList.elementAt(i);  
	System.out.println("Installed is : " + friend.getInstalled());
	System.out.println("Id is : " + friend.getId());
	System.out.println("Name is : " + friend.getName());
}         
String userName = "Nick";
Social social = socialService.getFacebookFriendsFromLinkUser(userName); 
System.out.println("userName is " + social.getUserName());
for(int i =0; i < social.getFriendList().size();i++)
{
	System.out.println("Installed is : " + social.getFriendList().get(i).getInstalled());
	System.out.println("Id is : " + social.getFriendList().get(i).getId());
	System.out.println("Picture is :" + social.getFriendList().get(i).getPicture());
	System.out.println("Name is : " + social.getFriendList().get(i).getName());
}    
String userName = "Nick";   
App42Log.SetDebug(true);		//Print output in your editor console
socialService.GetFacebookFriendsFromLinkUser(userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName());
		for(int i =0; i < social.GetFriendList().Count;i++)
		{
			App42Log.Console("Installed is : " + social.GetFriendList()[i].GetInstalled());
			App42Log.Console("Id is : " + social.GetFriendList()[i].GetId());
			App42Log.Console("Name is : " + social.GetFriendList()[i].GetName());
		}     
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",    
social ;
socialService.getFacebookFriendsFromLinkUser(userName,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
	},
	error: function(error) {
	}
});
local userName = "Nick"
local App42CallBack = {}
socialService:getFacebookFriendsFromLinkUser(userName,App42CallBack)
function App42CallBack:onSuccess(object)
	print("userName is " ..object:getUserName()); 
	for m=1,table.getn(object:getFriendList()) do
		print(object:getFriendList()[m]:getInstalled())
		print("Id is : " ..object:getFriendList()[m]:getId());  
		print("Picture is :" ..object:getFriendList()[m]:getPicture());  
		print("Name is : " ..object:getFriendList()[m]:getName());  
	end    
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
socialService->GetFacebookFriendsFromLinkUser(userName, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());        
        /**
         * Getting friends
         */
        vector<App42Friend> friends = app42SocialResponse->friendsList;
        for(std::vector<App42Friend>::iterator it = friends.begin(); it != friends.end(); ++it)
        {
            printf("\nFriendId=%s",it->getFriendId().c_str());
            printf("\nName=%s\n",it->getName().c_str());
            printf("\nPictureUrl=%s\n",it->getPicture().c_str());
            printf("\nInstalled=%d\n",it->getInstalled());
        }
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";   
Social social = socialService.GetFacebookFriendsFromLinkUser(userName);   
Console.WriteLine("userName is" + social.GetUserName());
for(int i =0; i < social.GetFriendList().Count;i++)
{
	Console.WriteLine("Installed is : " + social.GetFriendList()[i].GetInstalled());
	Console.WriteLine("Id is : " + social.GetFriendList()[i].GetId());
	Console.WriteLine("Name is : " + social.GetFriendList()[i].GetName());
}     
$userName = "Nick";
$social = $socialService->getFacebookFriendsFromLinkUser($userName); 
print_r("userName is" . $social->getUserName());
$friendList = $social->getFriendslist();
foreach ($friendList as $friends) 
{
	print_r("Friend Name : ".$friends->getName());
	print_r("Id : ".$friends->getId());
	print_r("Picture is : ".$friends->getPicture());
	print_r("Installed is : " . $friends->getInstalled());
}
$jsonResponse = $social->toString();
const char* userName = "Nick";
socialService->GetFacebookFriendsFromLinkUser(userName, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());        
        /**
         * Getting friends
         */
        vector<App42Friend> friends = app42SocialResponse->friendsList;
        for(std::vector<App42Friend>::iterator it = friends.begin(); it != friends.end(); ++it)
        {
            printf("\nFriendId=%s",it->getFriendId().c_str());
            printf("\nName=%s\n",it->getName().c_str());
            printf("\nPictureUrl=%s\n",it->getPicture().c_str());
            printf("\nInstalled=%d\n",it->getInstalled());
        }
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
Not Available
var userName:String = "Nick";  
socialService.getFacebookFriendsFromLinkUser(userName, new callback());  
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		if(social.getFriendList().length > 0){
			for(var i:int=0;i<social.getFriendList().length;i++){
				trace("Name is : " + Friends(social.getFriendList()[i]).getName());
				trace("Id is " + Friends(social.getFriendList()[i]).getId());
				trace("Picture is " + Friends(social.getFriendList()[i]).getPicture());
				trace("Installed is " + Friends(social.getFriendList()[i]).getInstalled());
			}
		}
	} 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
}  
Not Available

Get Facebook Friends From AccessToken

This function returns a list of Facebook friends of the specified user using a given authorization token.

Required Parameters

accessToken - Facebook Access Token that has been received after authorization.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String accessToken = "<Enter Facebook Access Token>";
socialService.getFacebookFriendsFromAccessToken(accessToken, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("accessToken is " + social.getFacebookAccessToken());
	for(int i =0; i < social.getFriendList().size();i++)
	{
		System.out.println("Installed is : " + social.getFriendList().get(i).getInstalled());
		System.out.println("Id is : " + social.getFriendList().get(i).getId());
		System.out.println("Picture is :" + social.getFriendList().get(i).getPicture());
		System.out.println("Name is : " + social.getFriendList().get(i).getName());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});    
      
String accessToken = "<Enter Facebook Access Token>";
socialService.GetFacebookFriendsFromAccessToken(accessToken, new Callback());  
public class Callback : App42Callback  
{     
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("accessToken is" + social.GetFacebookAccessToken()); 
		Console.WriteLine("userName is" + social.GetUserName());
		for(int i =0; i < social.GetFriendList().Count;i++)
		{
			Console.WriteLine("Installed is : " + social.GetFriendList()[i].GetInstalled());
			Console.WriteLine("Id is : " + social.GetFriendList()[i].GetId());
			Console.WriteLine("Name is : " + social.GetFriendList()[i].GetName());
		}     
	}        
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
	  
NSString *accessToken = @"<Enter Facebook Access Token>";
Social *social = [socialService getFacebookFriendsFromAccessToken:accessToken];
for (Friends *friend in social.friendsList)
{
    NSLog(@"Name=%@",friend.name);
    NSLog(@"Picture=%@",friend.picture);
    NSLog(@"Id=%@",friend.friendId);
    NSLog(@"Installed=%d",friend.installed);
}
              
String accessToken = "<Enter Facebook Access Token>";
Social social = socialService.getFacebookFriendsFromAccessToken(accessToken); 
System.out.println("accessToken is " + social.getFacebookAccessToken());
Vector friendList = social.getFriendList();   
for(int i=0;i < friendList.size();i++)  
{ 
	Social.Friends friend = (Social.Friends)friendList.elementAt(i);  
	System.out.println("Installed is : " + friend.getInstalled());
	System.out.println("Id is : " + friend.getId());
	System.out.println("Name is : " + friend.getName());
}         
String accessToken = "<Enter Facebook Access Token>";            
Social social = socialService.getFacebookFriendsFromAccessToken(accessToken); 
System.out.println("accessToken is " + social.getFacebookAccessToken());
for(int i =0; i < social.getFriendList().size();i++)
{
	System.out.println("Installed is : " + social.getFriendList().get(i).getInstalled());
	System.out.println("Id is : " + social.getFriendList().get(i).getId());
	System.out.println("Picture is :" + social.getFriendList().get(i).getPicture());
	System.out.println("Name is : " + social.getFriendList().get(i).getName());
}    
String accessToken = "<Enter Facebook Access Token>";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.GetFacebookFriendsFromAccessToken(accessToken, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("accessToken is" + social.GetFacebookAccessToken());
		for(int i =0; i < social.GetFriendList().Count;i++)
		{
			App42Log.Console("Installed is : " + social.GetFriendList()[i].GetInstalled());
			App42Log.Console("Id is : " + social.GetFriendList()[i].GetId());
			App42Log.Console("Name is : " + social.GetFriendList()[i].GetName());
		}     
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
              
var accessToken = "<Enter Facebook Access Token>",
social ;
socialService.getFacebookFriendsFromAccessToken(accessToken,{
	success: function(object) {
	var response = JSON.parse(object);  
	social = socialObj.app42.response.social.friends;
	console.log("accessToken is " + social.getFacebookAccessToken)
	if(social.length == undefined)  
	{  
		console.log(social)  
	}  
	else 
	for(var i = 0; i < social.length; i++){ 
		console.log(social[i].id) 
		console.log(social[i].installed) 
		console.log(social[i].name) 
	}
	},
	error: function(error) {
	}
});
local accessToken = "<Enter Facebook Access Token>"
local App42CallBack = {}
socialService:getFacebookFriendsFromAccessToken(accessToken,App42CallBack)
function App42CallBack:onSuccess(object)
	print("Access Token is " ..object:getFacebookAccessToken()); 
	for m=1,table.getn(object:getFriendList()) do
		print(object:getFriendList()[m]:getInstalled())
		print("Id is : " ..object:getFriendList()[m]:getId());  
		print("Picture is :" ..object:getFriendList()[m]:getPicture());  
		print("Name is : " ..object:getFriendList()[m]:getName());  
	end    
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* accessToken = "<Enter Facebook Access Token>";
socialService->GetFacebookFriendsFromAccessToken(accessToken, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());  
        printf("\nFBAccessToken=%s",app42SocialResponse->social.getFacebookAccessToken().c_str());      
        /**
         * Getting friends
         */
        vector<App42Friend> friends = app42SocialResponse->friendsList;
        for(std::vector<App42Friend>::iterator it = friends.begin(); it != friends.end(); ++it)
        {
            printf("\nFriendId=%s",it->getFriendId().c_str());
            printf("\nName=%s\n",it->getName().c_str());
            printf("\nPictureUrl=%s\n",it->getPicture().c_str());
            printf("\nInstalled=%d\n",it->getInstalled());
        }
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
              
String accessToken = "<Enter Facebook Access Token>";
Social social = socialService.GetFacebookFriendsFromAccessToken(accessToken); 
Console.WriteLine("accessToken is" + social.GetFacebookAccessToken()); 
for(int i =0; i < social.GetFriendList().Count;i++)
{
	Console.WriteLine("Installed is : " + social.GetFriendList()[i].GetInstalled());
	Console.WriteLine("Id is : " + social.GetFriendList()[i].GetId());
	Console.WriteLine("Name is : " + social.GetFriendList()[i].GetName());
}     
              
$accessToken = "<Enter Facebook Access Token>";
$social = $socialService->getFacebookFriendsFromAccessToken($accessToken); 
print_r("accessToken is" . $social->getFacebookAccessToken());
$friendList = $social->getFriendslist();
foreach ($friendList as $friends) 
{
	print_r("Friend Name : ".$friends->getName());
	print_r("Id : ".$friends->getId());
	print_r("Picture is : ".$friends->getPicture());
	print_r("Installed is : " . $friends->getInstalled());
}
$jsonResponse = $social->toString();
const char* accessToken = "<Enter Facebook Access Token>";
socialService->GetFacebookFriendsFromAccessToken(accessToken, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());  
        printf("\nFBAccessToken=%s",app42SocialResponse->social.getFacebookAccessToken().c_str());      
        /**
         * Getting friends
         */
        vector<App42Friend> friends = app42SocialResponse->friendsList;
        for(std::vector<App42Friend>::iterator it = friends.begin(); it != friends.end(); ++it)
        {
            printf("\nFriendId=%s",it->getFriendId().c_str());
            printf("\nName=%s\n",it->getName().c_str());
            printf("\nPictureUrl=%s\n",it->getPicture().c_str());
            printf("\nInstalled=%d\n",it->getInstalled());
        }
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
Not Available
var accessToken:String = "<Enter Facebook Access Token>";
socialService.getFacebookFriendsFromAccessToken(accessToken, new callback());  
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("accessToken is " + social.getFacebookAccessToken());
		if(social.getFriendList().length > 0){
			for(var i:int=0;i<social.getFriendList().length;i++){
				trace("Name is : " + Friends(social.getFriendList()[i]).getName());
				trace("Id is " + Friends(social.getFriendList()[i]).getId());
				trace("Picture is " + Friends(social.getFriendList()[i]).getPicture());
				trace("Installed is " + Friends(social.getFriendList()[i]).getInstalled());
			}
		}
	}
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}   
}  
Not Available

Link User Twitter Account

Links the User Twitter access credentials to the App User account.

Required Parameters

userName - Name of the user whose Twitter account to be linked. accessToken - Twitter Access Token that has been received after authorization. accessTokenSecret - Twitter Access Token Secret that has been received after authorization.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";
socialService.linkUserTwitterAccount(userName, accessToken, accessTokenSecret, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is :" + social.getUserName());  
	System.out.println("TwitterAccessToken is : " + social.getTwitterAccessToken()); 
	System.out.println("TwitterAccessTokenSecret is :" + social.getTwitterAccessTokenSecret()); 
}
public void onException(Exception ex) {

System.out.println("Exception Message"+ex.getMessage());
}
});        
String userName = "Nick";                 
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";
socialService.LinkUserTwitterAccount(userName, accessToken,accessTokenSecret, new Callback());  
public class Callback : App42Callback  
{ 
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("twitterAccessToken is" + social.GetTwitterAccessToken()); 
		String jsonResponse = social.ToString();  
	}   
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
	
NSString *userName = @"Nick";                      
NSString *accessToken = @"<Enter Twitter Access Token>";                
NSString *accessTokenSecret = @"<Enter Twitter Access Token Secret>";
Social *social = [socialService linkUserTwitterAccount:userName accessToken:accessToken accessTokenSecret:accessTokenSecret); 
NSLog(@"userName is %@",social.userName);
NSLog(@"twitterAccessToken is %@",social.twitterAccessToken);
NSString *jsonResponse = [social toString];
String userName = "Nick";                                 
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";
Social social = socialService.linkUserTwitterAccount(userName, accessToken,accessTokenSecret); 
System.out.println("userName is " + social.getUserName());
System.out.println("twitterAccessToken is " + social.getTwitterAccessToken());
String jsonResponse = social.toString();    
String userName = "Nick";                                          
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";
Social social = socialService.linkUserTwitterAccount(userName, accessToken,accessTokenSecret); 
System.out.println("userName is :" + social.getUserName());  
System.out.println("TwitterAccessToken is : " + social.getTwitterAccessToken()); 
System.out.println("TwitterAccessTokenSecret is :" + social.getTwitterAccessTokenSecret()); 
String jsonResponse = social.toString();    
String userName = "Nick";                                 
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.LinkUserTwitterAccount(userName, accessToken,accessTokenSecret, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("twitterAccessToken is" + social.GetTwitterAccessToken()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",                          
accessToken = "<Enter Twitter Access Token>",                
accessTokenSecret = "<Enter Twitter Access Token Secret>",
social ;
socialService.linkUserTwitterAccount(userName, accessToken,accessTokenSecret,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("twitterAccessToken is " + social.twitterAccessToken)
	},
	error: function(error) {
	}
});
local userName = "Nick"                        
local accessToken = "<Enter Twitter Access Token>"                
local accessTokenSecret = "<Enter Twitter Access Token Secret>"
local App42CallBack = {}
socialService:linkUserTwitterAccount(userName,accessToken, accessTokenSecret,App42CallBack)
function App42CallBack:onSuccess(object)
	print("userName is :"..object:getUserName());    
	print("TwitterAccessToken is : " ..object:getTwitterAccessToken());   
	print("TwitterAccessTokenSecret is :" ..object:getTwitterAccessTokenSecret());     
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* twitterAccessToken = "<Enter Twitter Access Token>";
const char* twitterAccessTokenSecret = "<Enter Twitter Access Token Secret>";
socialService->LinkUserTwitterAccount(userName, twitterAccessToken, twitterAccessTokenSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nTwitterAccessToken=%s",app42SocialResponse->social.getTwitterAccessToken().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                                 
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";
Social social = socialService.LinkUserTwitterAccount(userName, accessToken,accessTokenSecret); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("twitterAccessToken is" + social.GetTwitterAccessToken()); 
String jsonResponse = social.ToString();         
$userName = "Nick";                                
$accessToken = "<Enter Twitter Access Token>";                
$accessTokenSecret = "<Enter Twitter Access Token Secret>";
$social = $socialService->linkUserTwitterAccount($userName, $accessToken,$accessTokenSecret); 
Print_r("userName is" . $social->getUserName());
Print_r("twitterAccessToken is" . $social->getTwitterAccessToken());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* twitterAccessToken = "<Enter Twitter Access Token>";
const char* twitterAccessTokenSecret = "<Enter Twitter Access Token Secret>";
socialService->LinkUserTwitterAccount(userName, twitterAccessToken, twitterAccessTokenSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nTwitterAccessToken=%s",app42SocialResponse->social.getTwitterAccessToken().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";						
twitter_access_token = "<Enter Twitter Access Token>";
twitter_access_token_secret = "<Enter Twitter Access Token Secret>";						
social = socialService.link_user_twitter_account(user_name, twitter_access_token, twitter_access_token_secret); 
puts "userName is #{social.user_name}";
puts "twitterAccessToken is #{social.twitter_access_token}"; 
puts "twitterAccessTokenSecret is #{social.twitter_access_token_secret}"; 
json_response = social.to_s();
var userName:String = "Nick";                                 
var accessToken:String = "<Enter Twitter Access Token>";                
var accessTokenSecret:String = "<Enter Twitter Access Token Secret>";
socialService.linkUserTwitterAccount(userName,accessToken,accessTokenSecret, new callback());  
public class callback implements App42CallBack  
{  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("twitterAccessToken is " + social.getTwitterAccessToken());
	}  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
}  
Not Available

Link User Twitter Account With App Credentials

Links the User Twitter access credentials to the App User account.

Required Parameters

userName - Name of the user whose Twitter account to be linked. accessToken - Twitter Access Token that has been received after authorization. accessTokenSecret - Twitter Access Token Secret that has been received after authorization. consumerKey - Twitter App Consumer Key. consumerSecret - Twitter App Consumer Secret.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String accessToken = "<Enter Twitter Access Token>";                                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";                
String consumerKey = "<Enter Twitter Consumer Key>";
String consumerSecret = "<Enter Twitter Consumer Secret>";
socialService.linkUserTwitterAccount(userName,accessToken,accessTokenSecret,twitterConsumerKey,consumerSecret,new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is " + social.getUserName());  
	System.out.println("twitterAccessToken is :" + social.getTwitterAccessToken());  
	System.out.println("twitterAccessTokenSecret is :" + social.getTwitterAccessTokenSecret());  
	System.out.println("twitterConsumerKey is :" + social.getTwitterConsumerKey());  
	System.out.println("twitterConsumerSecret is :" + social.getTwitterConsumerSecret()); 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});       
String userName = "Nick";                 
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";              
String consumerKey = "<Enter Twitter Consumer Key>";
String consumerSecret = "<Enter Twitter Consumer Secret>";
socialService.LinkUserTwitterAccount(userName, accessToken,accessTokenSecret,consumerKey,consumerSecret, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("twitterAccessToken is" + social.GetTwitterAccessToken()); 
		String jsonResponse = social.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
	
NSString *userName = @"Nick";                      
NSString *accessToken = @"<Enter Twitter Access Token>";                
NSString *accessTokenSecret = @"<Enter Twitter Access Token Secret>";              
NSString *consumerKey = @"<Enter Twitter Consumer Key>";
NSString *consumerSecret = @"<Enter Twitter Consumer Secret>";
Social *social = [socialService linkUserTwitterAccount:userName accessToken:accessToken accessTokenSecret:accessTokenSecret consumerKey:consumerKey consumerSecret:consumerSecret); 
NSLog(@"userName is %@",social.userName);
NSLog(@"twitterAccessToken is %@",social.twitterAccessToken);
NSString *jsonResponse = [social toString];
String userName = "Nick";                                 
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";              
String consumerKey = "<Enter Twitter Consumer Key>";
String consumerSecret = "<Enter Twitter Consumer Secret>";
Social social = socialService.linkUserTwitterAccount(userName, accessToken,accessTokenSecret,consumerKey,consumerSecret); 
System.out.println("userName is " + social.getUserName());
System.out.println("twitterAccessToken is " + social.getTwitterAccessToken());
String jsonResponse = social.toString();    
String userName = "Nick";                                          
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";              
String consumerKey = "<Enter Twitter Consumer Key>";
String consumerSecret = "<Enter Twitter Consumer Secret>";
Social social = socialService.linkUserTwitterAccount(userName, accessToken,accessTokenSecret,consumerKey,consumerSecret); 
System.out.println("userName is " + social.getUserName());  
System.out.println("twitterAccessToken is :" + social.getTwitterAccessToken());  
System.out.println("twitterAccessTokenSecret is :" + social.getTwitterAccessTokenSecret());  
System.out.println("twitterConsumerKey is :" + social.getTwitterConsumerKey());  
System.out.println("twitterConsumerSecret is :" + social.getTwitterConsumerSecret()); 
String jsonResponse = social.toString();    
String userName = "Nick";                                 
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";              
String consumerKey = "<Enter Twitter Consumer Key>";
String consumerSecret = "<Enter Twitter Consumer Secret>";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.LinkUserTwitterAccount(userName, accessToken, accessTokenSecret, consumerKey, consumerSecret, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("twitterAccessToken is" + social.GetTwitterAccessToken()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",                          
accessToken = "<Enter Twitter Access Token>",                
accessTokenSecret = "<Enter Twitter Access Token Secret>",              
consumerKey = "<Enter Twitter Consumer Key>",
consumerSecret = "<Enter Twitter Consumer Secret>",
social ;
socialService.linkUserTwitterAccountWithCredentials(userName, accessToken,accessTokenSecret,consumerKey,consumerSecret,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("twitterAccessToken is " + social.twitterAccessToken)
	},
	error: function(error) {
	}
});
local userName = "Nick"                          
local accessToken = "<Enter Twitter Access Token>"                
local accessTokenSecret = "<Enter Twitter Access Token Secret>"              
local consumerKey = "<Enter Twitter Consumer Key>"
local consumerSecret = "<Enter Twitter Consumer Secret>"
local App42CallBack = {}
socialService:linkUserLinkedInAccountWithCredentials(userName,accessToken, accessTokenSecret, consumerKey,consumerSecret ,App42CallBack)
function App42CallBack:onSuccess(object)
	print("userName is " ..object:getUserName());    
	print("linkedinAccessToken is " ..object:getLinkedinAccessToken());    
	print("linkedinAccessTokenSecret is " ..object:getLinkedinAccessTokenSecret());    
	print("LinkedinApiKey" ..object:getLinkedinApiKey());    
	print("LinkedinSecretKey" ..object:getLinkedinSecretKey());       
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* twitterConsumerKey = "<Enter Twitter Consumer Key>";
const char* twitterConsumerSecret = "<Enter Twitter Consumer Secret>";
const char* twitterAccessToken = "<Enter Twitter Access Token>";                
const char* twitterAccessTokenSecret = "<Enter Twitter Access Token Secret>";              
socialService->LinkUserTwitterAccount(userName, twitterConsumerKey, twitterConsumerSecret, twitterAccessToken, twitterAccessTokenSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nTWAccessToken=%s",app42SocialResponse->social.getTwitterAccessToken().c_str());
        printf("\nTWAccessTokenSecret=%s",app42SocialResponse->social.getTwitterAccessTokenSecret().c_str());
        printf("\nTWConsumerKey=%s",app42SocialResponse->social.getTwitterConsumerKey().c_str());
        printf("\nTWConsumerSecret=%s",app42SocialResponse->social.getTwitterConsumerSecret().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                                 
String accessToken = "<Enter Twitter Access Token>";                
String accessTokenSecret = "<Enter Twitter Access Token Secret>";              
String consumerKey = "<Enter Twitter Consumer Key>";
String consumerSecret = "<Enter Twitter Consumer Secret>";
Social social = socialService.LinkUserTwitterAccount(userName, accessToken,accessTokenSecret,consumerKey,consumerSecret); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("twitterAccessToken is" + social.GetTwitterAccessToken()); 
String jsonResponse = social.ToString();         
$userName = "Nick";                                
$accessToken = "<Enter Twitter Access Token>";                
$accessTokenSecret = "<Enter Twitter Access Token Secret>";              
$consumerKey = "<Enter Twitter Consumer Key>";
$consumerSecret = "<Enter Twitter Consumer Secret>";
$social = $socialService->linkUserTwitterAccount($userName, $accessToken,$accessTokenSecret,$consumerKey,$consumerSecret); 
Print_r("userName is" . $social->getUserName());
Print_r("twitterAccessToken is" . $social->getTwitterAccessToken());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* twitterConsumerKey = "<Enter Twitter Consumer Key>";
const char* twitterConsumerSecret = "<Enter Twitter Consumer Secret>";
const char* twitterAccessToken = "<Enter Twitter Access Token>";                
const char* twitterAccessTokenSecret = "<Enter Twitter Access Token Secret>";              
socialService->LinkUserTwitterAccount(userName, twitterConsumerKey, twitterConsumerSecret, twitterAccessToken, twitterAccessTokenSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nTWAccessToken=%s",app42SocialResponse->social.getTwitterAccessToken().c_str());
        printf("\nTWAccessTokenSecret=%s",app42SocialResponse->social.getTwitterAccessTokenSecret().c_str());
        printf("\nTWConsumerKey=%s",app42SocialResponse->social.getTwitterConsumerKey().c_str());
        printf("\nTWConsumerSecret=%s",app42SocialResponse->social.getTwitterConsumerSecret().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";
twitter_access_token = "<Enter Twitter Access Token>";
twitter_access__token_secret = "<Enter Twitter Access Token Secret>";						
twitter_consumer_key = "<Enter Twitter Consumer Key>";
twitter_consumer_secret = "<Enter Twitter Consumer Secret>";			
social = social_service.link_user_twitter_account_with_token(user_name, twitter_access_token, twitter_access__token_secret, twitter_consumer_key, twitter_consumer_secret); 
puts "userName is #{social.user_name}";
puts "twitterAccessToken is #{social.twitter_access_token}"; 
puts "twitterAccessTokenSecret is #{social.twitter_access__token_secret}";
puts "twitterConsumerKey is #{social.twitter_consumer_key}";
puts "twitterConsumerSecret is #{social.twitter_consumer_secret}";
json_response = social.to_s();
var userName:String = "Nick";                                 
var accessToken:String = "<Enter Twitter Access Token>";                
var accessTokenSecret:String = "<Enter Twitter Access Token Secret>";            
var consumerKey:String = "<Enter Twitter Consumer Key>";
var consumerSecret:String = "<Enter Twitter Consumer Secret>";
socialService.linkUserTwitterAccountWithCredentials(userName,accessToken,accessTokenSecret,consumerKey,consumerSecret, new callback());  
public class callback implements App42CallBack  
{  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("twitterAccessToken is " + social.getTwitterAccessToken());
	}  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
}  
Not Available

Update Twitter Status

Updates the Twitter status of the specified user.

Required Parameters

userName - Name of the user for whom the status needs to be updated. status - Status that has to be updated.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String status = "Nick is using the App42 API";
socialService.updateTwitterStatus(userName, status, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is :" + social.getUserName());  
	System.out.println("Status is : " + social.getStatus()); 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});       
String userName = "Nick";                  
String status = "Nick is using the App42 API";
socialService.UpdateTwitterStatus(userName, status, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("status is" + social.GetStatus()); 
		String jsonResponse = social.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
	
NSString *userName = @"Nick";                 
NSString *status = @"Nick is using the App42 API";
Social *social = [socialService updateTwitterStatus:userName status:status); 
NSLog(@"userName is %@",social.userName);
NSLog(@"status is %@",social.status);
NSString *jsonResponse = [social toString];
String userName = "Nick";                       
String status = "Nick is using the App42 API";
Social social = socialService.updateTwitterStatus(userName, status); 
System.out.println("userName is " + social.getUserName());
System.out.println("fb Access Token is " + social.getStatus());
String jsonResponse = social.toString();    
String userName = "Nick";                 
String status = "Nick is using the App42 API";
Social social = socialService.updateTwitterStatus(userName, status); 
System.out.println("userName is :" + social.getUserName());  
System.out.println("Status is : " + social.getStatus()); 
String jsonResponse = social.toString();    
String userName = "Nick";                
String status = "Nick is using the App42 API";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.UpdateTwitterStatus(userName, status, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("status is" + social.GetStatus()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",              
status = "Nick is using the App42 API",
social ;
socialService.updateTwitterStatus(userName, status,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("status is " + social.status)
	},
	error: function(error) {
	}
});
local userName = "Nick"                          
local status = "Nick is using the App42 API"        
local App42CallBack = {}
socialService:updateTwitterStatus(userName, status ,App42CallBack)
function App42CallBack:onSuccess(object)
	print("userName is :"..object:getUserName());    
	print("Status is : "..object:getStatus());       
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateTwitterStatus(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nStatus=%s",app42SocialResponse->social.getStatus().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                
String status = "Nick is using the App42 API";
Social social = socialService.UpdateTwitterStatus(userName, status); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("status is" + social.GetStatus()); 
String jsonResponse = social.ToString();         
$userName = "Nick";              
$status = "Nick is using the App42 API";
$social = $socialService->updateTwitterStatus($userName, $status); 
Print_r("userName is" . $social->getUserName());
Print_r("status is" . $social->getStatus());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateTwitterStatus(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nStatus=%s",app42SocialResponse->social.getStatus().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";
status = "Nick is using the App42 API";	
social = social_service.update_twitter_status(user_name, status); 
puts "userName is #{social.user_name}";
puts "status is #{social.status}";
puts "twitterConsumerKey is #{social.twitter_consumer_key}";
puts "twitterConsumerSecret is #{social.twitter_consumer_secret}";
puts "twitterAccessToken is #{social.twitter_access_token}";
puts "twitterAccessToken is #{social.twitter_access_token_secret}";
json_response = social.to_s(); 
var userName:String = "Nick";                  
var status:String = "Nick is using the App42 API";
socialService.updateTwitterStatus(userName,status, new callback());  
public class callback implements App42CallBack  
{  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("status is " + social.getStatus());
	}  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
}  
Not Available

Link User LinkedIn Account

Links the User LinkedIn access credentials to the App User account.

Required Parameters

userName - Name of the user whose LinkedIn account to be linked. accessToken - LinkedIn Access Token that has been received after authorization. accessTokenSecret - LinkedIn Access Token Secret that has been received after authorization.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";
socialService.linkUserLinkedInAccount(userName, accessToken, accessTokenSecret, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is " + social.getUserName());  
	System.out.println("linkedinAccessToken is " + social.getLinkedinAccessToken());  
	System.out.println("linkedinAccessTokenSecret is " + social.getLinkedinAccessTokenSecret()); 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});        
String userName = "Nick";                 
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";
socialService.LinkUserLinkedInAccount(userName, accessToken,accessTokenSecret, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("linkedinAccessToken is" + social.GetLinkedinAccessToken()); 
		String jsonResponse = social.ToString();  
	}   
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
	
NSString *userName = @"Nick";                      
NSString *accessToken = @"<Enter LinkedIn Access Token>";                
NSString *accessTokenSecret = @"<Enter LinkedIn Access Token Secret>";
Social *social = [socialService linkUserLinkedInAccount:userName accessToken:accessToken accessTokenSecret:accessTokenSecret); 
NSLog(@"userName is %@",social.userName);
NSLog(@"linkedinAccessToken is %@",social.linkedinAccessToken);
NSString *jsonResponse = [social toString];
String userName = "Nick";                                 
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";
Social social = socialService.linkUserLinkedInAccount(userName, accessToken,accessTokenSecret); 
System.out.println("userName is " + social.getUserName());
System.out.println("linkedinAccessToken is " + social.getLinkedinAccessToken());
String jsonResponse = social.toString();    
String userName = "Nick";                                          
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";
Social social = socialService.linkUserLinkedInAccount(userName, accessToken,accessTokenSecret); 
System.out.println("userName is " + social.getUserName());  
System.out.println("linkedinAccessToken is " + social.getLinkedinAccessToken());  
System.out.println("linkedinAccessTokenSecret is " + social.getLinkedinAccessTokenSecret()); 
String jsonResponse = social.toString();    
String userName = "Nick";                                 
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.LinkUserLinkedInAccount(userName, accessToken,accessTokenSecret, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("linkedinAccessToken is" + social.GetLinkedinAccessToken()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",                          
accessToken = "<Enter LinkedIn Access Token>",                
accessTokenSecret = "<Enter LinkedIn Access Token Secret>",
social ;
socialService.linkUserLinkedInAccount(userName, accessToken,accessTokenSecret,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("linkedinAccessToken is " + social.linkedinAccessToken)
	},
	error: function(error) {
	}
});
local userName = "Nick"                          
local accessToken = "<Enter LinkedIn Access Token>"                 
local accessTokenSecret = "<Enter LinkedIn Access Token Secret>"        
local App42CallBack = {}
socialService:linkUserLinkedInAccount(userName,	accessToken, accessTokenSecret ,App42CallBack)
function App42CallBack:onSuccess(object)
	print("userName is "..object:getUserName());    
	print("linkedinAccessToken is " ..object:getLinkedinAccessToken());    
	print("linkedinAccessTokenSecret is " ..object:getLinkedinAccessTokenSecret());      
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* linkedinAccessToken = "<Enter LinkedIn Access Token>";                
const char* linkedinAccessTokenSecret = "<Enter LinkedIn Access Token Secret>";
socialService->LinkUserLinkedInAccount(userName, linkedinAccessToken, linkedinAccessTokenSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nLinkedInAccessToken=%s",app42SocialResponse->social.getLinkedinAccessToken().c_str());
        printf("\nLinkedInAccessTokenSecret=%s",app42SocialResponse->social.getLinkedinAccessTokenSecret().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}    
String userName = "Nick";                                 
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";
Social social = socialService.LinkUserLinkedInAccount(userName, accessToken,accessTokenSecret); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("linkedinAccessToken is" + social.GetLinkedinAccessToken()); 
String jsonResponse = social.ToString();         
$userName = "Nick";                                
$accessToken = "<Enter LinkedIn Access Token>";                
$accessTokenSecret = "<Enter LinkedIn Access Token Secret>";
$social = $socialService->linkUserLinkedInAccount($userName, $accessToken,$accessTokenSecret); 
print_r("userName is" . $social->getUserName());
print_r("linkedinAccessToken is" . $social->getLinkedinAccessToken());
print_r("linkedinAccessTokenSecret is " . $social->getLinkedinAccessTokenSecret());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* linkedinAccessToken = "<Enter LinkedIn Access Token>";                
const char* linkedinAccessTokenSecret = "<Enter LinkedIn Access Token Secret>";
socialService->LinkUserLinkedInAccount(userName, linkedinAccessToken, linkedinAccessTokenSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nLinkedInAccessToken=%s",app42SocialResponse->social.getLinkedinAccessToken().c_str());
        printf("\nLinkedInAccessTokenSecret=%s",app42SocialResponse->social.getLinkedinAccessTokenSecret().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";						
access_token = "<Enter LinkedIn Access Token>";
access_token_secret = "<Enter LinkedIn Access Token Secret>";						
social = social_service.link_user_linkedIn_account(user_name, access_token, access_token_secret);   
puts "userName is #{social.user_name}";
puts "linkedinAccessToken is #{social.linkedin_access_token}";
puts "linkedinAccessTokenSecret is #{social.linkedin_access_token_secret}";
response = social.response(); 
json_response = social.to_s();
var userName:String = "Nick";                                 
var accessToken:String = "<Enter LinkedIn Access Token>";                
var accessTokenSecret:String = "<Enter LinkedIn Access Token Secret>";   
socialService.linkUserLinkedInAccount(userName,accessToken,accessTokenSecret, new callback());  
public class callback implements App42CallBack  
{  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("linkedinAccessToken is " + social.getLinkedinAccessToken());
	} 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}   
}  
Not Available

Link User LinkedIn Account With App Credentials

Link the User LinkedIn access credentials to the App User account.

Required Parameters

userName - Name of the user whose LinkedIn account to be linked. accessToken - LinkedIn Access Token that has been received after authorization. accessTokenSecret - LinkedIn Access Token Secret that has been received after authorization. apiKey - LinkedIn App API Key. secretKey - LinkedIn App Secret Key.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String accessToken = "<Enter LinkedIn Access Token>";                                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";                
String apiKey = "<Enter LinkedIn Api Key>";
String secretKey = "<Enter LinkedIn Secret Key>";
socialService.linkUserLinkedInAccount(userName,accessToken,accessTokenSecret,apiKey,secretKey,new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is " + social.getUserName());  
	System.out.println("linkedinAccessToken is " + social.getLinkedinAccessToken());  
	System.out.println("linkedinAccessTokenSecret is " + social.getLinkedinAccessTokenSecret());  
	System.out.println("LinkedinApiKey" + social.getLinkedinApiKey());  
	System.out.println("LinkedinSecretKey" + social.getLinkedinSecretKey());  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});        
String userName = "Nick";                 
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";                    
String apiKey = "<Enter LinkedIn Api Key>";
String secretKey = "<Enter LinkedIn Secret Key>";
socialService.LinkUserLinkedInAccount(userName, accessToken,accessTokenSecret,apiKey,secretKey, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("linkedinAccessToken is" + social.GetLinkedinAccessToken()); 
		String jsonResponse = social.ToString();  
	}  
}  
	
NSString *userName = @"Nick";                      
NSString *accessToken = @"<Enter LinkedIn Access Token>";                
NSString *accessTokenSecret = @"<Enter LinkedIn Access Token Secret>";                  
NSString *apiKey = @"<Enter LinkedIn Api Key>";
NSString *secretKey = @"<Enter LinkedIn Secret Key>";
Social *social = [socialService linkUserLinkedInAccount:userName accessToken:accessToken accessTokenSecret:accessTokenSecret apiKey:apiKey secretKey:secretKey); 
NSLog(@"userName is %@",social.userName);
NSLog(@"linkedinAccessToken is %@",social.linkedinAccessToken);
NSString *jsonResponse = [social toString];
String userName = "Nick";                                 
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";                
String apiKey = "<Enter LinkedIn Api Key>";
String secretKey = "<Enter LinkedIn Secret Key>";
Social social = socialService.linkUserLinkedInAccount(userName, accessToken,accessTokenSecret,apiKey,secretKey); 
System.out.println("userName is " + social.getUserName());
System.out.println("linkedinAccessToken is" + social.getLinkedinAccessToken());
String jsonResponse = social.toString();    
String userName = "Nick";                                          
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";                 
String apiKey = "<Enter LinkedIn Api Key>";
String secretKey = "<Enter LinkedIn Secret Key>";
Social social = socialService.linkUserLinkedInAccount(userName, accessToken,accessTokenSecret,apiKey,secretKey); 
System.out.println("userName is " + social.getUserName());  
System.out.println("linkedinAccessToken is " + social.getLinkedinAccessToken());  
System.out.println("linkedinAccessTokenSecret is " + social.getLinkedinAccessTokenSecret());  
System.out.println("LinkedinApiKey" + social.getLinkedinApiKey());  
System.out.println("LinkedinSecretKey" + social.getLinkedinSecretKey());  
String jsonResponse = social.toString();    
String userName = "Nick";                                 
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";                 
String apiKey = "<Enter LinkedIn Api Key>";
String secretKey = "<Enter LinkedIn Secret Key>";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.LinkUserLinkedInAccount(userName, accessToken, accessTokenSecret, apiKey, secretKey, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("linkedinAccessToken is" + social.GetLinkedinAccessToken()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",                          
accessToken = "<Enter LinkedIn Access Token>",                
accessTokenSecret = "<Enter LinkedIn Access Token Secret>",                  
apiKey = "<Enter LinkedIn Api Key>",
secretKey = "<Enter LinkedIn Secret Key>",
social ;
socialService.linkUserLinkedInAccountWithCredentials(userName, accessToken,accessTokenSecret,apiKey,secretKey,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("linkedinAccessToken is" + social.linkedinAccessToken)
	},
	error: function(error) {
	}
});
local userName = "Nick"                          
local accessToken = "<Enter LinkedIn Access Token>"                 
local accessTokenSecret = "<Enter LinkedIn Access Token Secret>"     
local apiKey = "<Enter LinkedIn Api Key>"
local secretKey = "<Enter LinkedIn Secret Key>"  
local App42CallBack = {}
socialService:linkUserLinkedInAccountWithCredentials(userName,accessToken, accessTokenSecret, apiKey,secretKey ,App42CallBack)
function App42CallBack:onSuccess(object)
	print("userName is " ..object:getUserName());    
	print("linkedinAccessToken is " ..object:getLinkedinAccessToken());    
	print("linkedinAccessTokenSecret is " ..object:getLinkedinAccessTokenSecret());    
	print("LinkedinApiKey" ..object:getLinkedinApiKey());    
	print("LinkedinSecretKey" ..object:getLinkedinSecretKey());       
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* linkedinApiKey = "<Enter LinkedIn Api Key>";
const char* linkedinSecretKey = "<Enter LinkedIn Secret Key>";
const char* linkedinAccessToken = "<Enter LinkedIn Access Token>";                
const char* linkedinAccessTokenSecret = "<Enter LinkedIn Access Token Secret>";
socialService->LinkUserLinkedInAccount(userName, linkedinApiKey, linkedinSecretKey, linkedinAccessToken, linkedinAccessTokenSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nLinkedInAccessToken=%s",app42SocialResponse->social.getLinkedinAccessToken().c_str());
        printf("\nLinkedInAccessTokenSecret=%s",app42SocialResponse->social.getLinkedinAccessTokenSecret().c_str());
        printf("\nLinkedinApiKey=%s",app42SocialResponse->social.getLinkedinApiKey().c_str());
        printf("\nLinkedinSecretKey=%s",app42SocialResponse->social.getLinkedinSecretKey().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                                 
String accessToken = "<Enter LinkedIn Access Token>";                
String accessTokenSecret = "<Enter LinkedIn Access Token Secret>";                 
String apiKey = "<Enter LinkedIn Api Key>";
String secretKey = "<Enter LinkedIn Secret Key>";
Social social = socialService.LinkUserLinkedInAccount(userName, accessToken,accessTokenSecret,apiKey,secretKey); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("linkedinAccessToken is" + social.GetLinkedinAccessToken()); 
String jsonResponse = social.ToString();         
$userName = "Nick";                                
$accessToken = "<Enter LinkedIn Access Token>";                
$accessTokenSecret = "<Enter LinkedIn Access Token Secret>";                  
$apiKey = "<Enter LinkedIn Api Key>";
$secretKey = "<Enter LinkedIn Secret Key>";
$social = $socialService->linkUserLinkedInAccount($userName, $accessToken,$accessTokenSecret,$apiKey,$secretKey); 
print_r("userName is" . $social->getUserName());
print_r("LinkedinAccessToken" . $social->getLinkedinAccessToken());
print_r("LinkedinAccessTokenSecret" . $social->getLinkedinAccessTokenSecret());
print_r("LinkedinApiKey" . $social->getLinkedinApiKey());  
print_r("LinkedinSecretKey" . $social->getLinkedinSecretKey()); 
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* linkedinApiKey = "<Enter LinkedIn Api Key>";
const char* linkedinSecretKey = "<Enter LinkedIn Secret Key>";
const char* linkedinAccessToken = "<Enter LinkedIn Access Token>";                
const char* linkedinAccessTokenSecret = "<Enter LinkedIn Access Token Secret>";
socialService->LinkUserLinkedInAccount(userName, linkedinApiKey, linkedinSecretKey, linkedinAccessToken, linkedinAccessTokenSecret, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nLinkedInAccessToken=%s",app42SocialResponse->social.getLinkedinAccessToken().c_str());
        printf("\nLinkedInAccessTokenSecret=%s",app42SocialResponse->social.getLinkedinAccessTokenSecret().c_str());
        printf("\nLinkedinApiKey=%s",app42SocialResponse->social.getLinkedinApiKey().c_str());
        printf("\nLinkedinSecretKey=%s",app42SocialResponse->social.getLinkedinSecretKey().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";	
access_token = "<Enter LinkedIn Access Token>";
access_token_secret = "<Enter LinkedIn Access Token Secret>";						
api_key = "<Enter LinkedIn Api Key>";
secret_key = "<Enter LinkedIn Secret Key>";					
social = social_service.link_user_linkedIn_account_with_token(user_name, access_token, access_token_secret, api_key, secret_key);
puts "userName is #{social.user_name}";
puts "linkedinAccessToken is #{social.linkedin_access_token}";
puts "linkedinAccessTokenSecret is #{social.linkedin_access_token_secret}";
puts "linkedinApiKey is #{social.linkedin_api_key}";
puts "linkedinSecretKey is #{social.linkedin_secret_key}";
response = social.response(); 
json_response = social.to_s();
var userName:String = "Nick";                                 
var accessToken:String = "<Enter LinkedIn Access Token>";                
var accessTokenSecret:String = "<Enter LinkedIn Access Token Secret>";                  
var apiKey:String = "<Enter LinkedIn Api Key>";
var secretKey:String = "<Enter LinkedIn Secret Key>"; 
socialService.linkUserLinkedInAccountWithCredentials(userName,accessToken,accessTokenSecret,apiKey,secretKey, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("accessToken is " + social.getLinkedinAccessToken());
	}  
}  
Not Available

Update Linkedin Status

Updates the LinkedIn status of the specified user.

Required Parameters

userName - Name of the user for whom the status needs to be updated. status - Status that has to be updated.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";                  
String status = "Nick is using the App42 API";
socialService.updateLinkedInStatus(userName, status, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is " + social.getUserName());  
	System.out.println("status is " + social.getStatus());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});       
String userName = "Nick";                  
String status = "Nick is using the App42 API";
socialService.UpdateLinkedInStatus(userName, status, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("status is" + social.GetStatus()); 
		String jsonResponse = social.ToString();  
	} 
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}   
}  
	
NSString *userName = @"Nick";                 
NSString *status = @"Nick is using the App42 API";
Social *social = [socialService updateLinkedInStatus:userName status:status); 
NSLog(@"userName is %@",social.userName);
NSLog(@"status is %@",social.status);
NSString *jsonResponse = [social toString];
String userName = "Nick";                       
String status = "Nick is using the App42 API";
Social social = socialService.updateLinkedInStatus(userName, status); 
System.out.println("userName is " + social.getUserName());
System.out.println("fb Access Token is " + social.getStatus());
String jsonResponse = social.toString();    
String userName = "Nick";                 
String status = "Nick is using the App42 API";
Social social = socialService.updateLinkedInStatus(userName, status); 
System.out.println("userName is " + social.getUserName());  
System.out.println("status is " + social.getStatus());
String jsonResponse = social.toString();    
String userName = "Nick";                
String status = "Nick is using the App42 API";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.UpdateLinkedInStatus(userName, status, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("status is" + social.GetStatus()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",              
status = "Nick is using the App42 API",
social ;
socialService.updateLinkedInStatus(userName, status,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("status is " + social.status)
	},
	error: function(error) {
	}
});
local userName = "Nick"                          
local status = "Nick is using the App42 API"     
local App42CallBack = {}
socialService:updateLinkedInStatus(userName,status ,App42CallBack)
function App42CallBack:onSuccess(object)  
	print("userName is " ..object:getUserName());    
	print("status is " ..object:getStatus());        
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateLinkedInStatus(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nStatus=%s",app42SocialResponse->social.getStatus().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                
String status = "Nick is using the App42 API";
Social social = socialService.UpdateLinkedInStatus(userName, status); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("status is" + social.GetStatus()); 
String jsonResponse = social.ToString();         
$userName = "Nick";              
$status = "Nick is using the App42 API";
$social = $socialService->updateLinkedInStatus($userName, $status); 
Print_r("userName is" . $social->getUserName());
Print_r("status is" . $social->getStatus());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateLinkedInStatus(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nStatus=%s",app42SocialResponse->social.getStatus().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";
status = "Nick is using the App42 API";
social = social_service.update_linkedIn_status(user_name, api_key, secret_key, access_token, access_token_secret); 
puts"userName is #{social.user_name}";
puts "linkedinApiKey is #{social.linkedin_api_key}";
puts "linkedinSecretKey is #{social.linkedin_secret_key}";
puts "linkedinAccessToken is #{social.linkedin_access_token}";
puts "linkedinAccessTokenSecret is #{social.linkedin_access_token_secret}";
response = social.response(); 
json_response = social.to_s();
var userName:String = "Nick";                  
var status:String = "Nick is using the App42 API";
socialService.updateLinkedInStatus(userName,status, new callback());  
public class callback implements App42CallBack  
{  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("status is " + social.getStatus());
	} 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}   
}  
Not Available

Update Social Status For All

Updates the status for all linked social accounts of the specified user.

Required Parameters

userName - Name of the user for whom the status needs to be updated. status - Status that has to be updated.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String status = "Nick is using the App42 API";
socialService.updateSocialStatusForAll(userName, status, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("userName is " + social.getUserName());  
	System.out.println("status is " + social.getStatus());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});        
String userName = "Nick";                  
String status = "Nick is using the App42 API";
socialService.UpdateSocialStatusForAll(userName, status, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;    
		Console.WriteLine("userName is" + social.GetUserName()); 
		Console.WriteLine("status is" + social.GetStatus()); 
		String jsonResponse = social.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
	
NSString *userName = @"Nick";                 
NSString *status = @"Nick is using the App42 API";
Social *social = [socialService updateSocialStatusForAll:userName status:status); 
NSLog(@"userName is %@",social.userName);
NSLog(@"status is %@",social.status);
NSString *jsonResponse = [social toString];
String userName = "Nick";                       
String status = "Nick is using the App42 API";
Social social = socialService.updateSocialStatusForAll(userName, status); 
System.out.println("userName is " + social.getUserName());
System.out.println("status is " + social.getStatus());
String jsonResponse = social.toString();    
String userName = "Nick";                 
String status = "Nick is using the App42 API";
Social social = socialService.updateSocialStatusForAll(userName, status); 
System.out.println("userName is " + social.getUserName());  
System.out.println("status is " + social.getStatus());
String jsonResponse = social.toString();    
String userName = "Nick";                
String status = "Nick is using the App42 API";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.updateSocialStatusForAll(userName, status, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("userName is" + social.GetUserName()); 
		App42Log.Console("status is" + social.GetStatus()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",              
status = "Nick is using the App42 API",
social ;
socialService.updateSocialStatusForAll(userName, status,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("userName is " + social.userName)
		console.log("status is " + social.status)
	},
	error: function(error) {
	}
});
local userName = "Nick"                          
local status = "Nick is using the App42 API"     
local App42CallBack = {}
socialService:updateSocialStatusForAll(userName,status ,App42CallBack)
function App42CallBack:onSuccess(object)  
	print("userName is " ..object:getUserName());    
	print("status is " ..object:getStatus());        
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateSocialStatusForAll(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));

void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nStatus=%s",app42SocialResponse->social.getStatus().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String userName = "Nick";                
String status = "Nick is using the App42 API";
Social social = socialService.updateSocialStatusForAll(userName, status); 
Console.WriteLine("userName is" + social.GetUserName()); 
Console.WriteLine("status is" + social.GetStatus()); 
String jsonResponse = social.ToString();         
$userName = "Nick";              
$status = "Nick is using the App42 API";
$social = $socialService->updateSocialStatusForAll($userName, $status); 
Print_r("userName is" . $social->getUserName());
Print_r("status is" . $social->getStatus());
$jsonResponse = $social->toString();
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateSocialStatusForAll(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));

void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        printf("\nUserName=%s",app42SocialResponse->social.getUserName().c_str());
        printf("\nStatus=%s",app42SocialResponse->social.getStatus().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
user_name = "Nick";
status = "Nick is using the App42 API";
social = social_service.update_social_status_for_all(user_name, status); 
puts "userName is #{social.user_name}";
response = social.response(); 
json_response = social.to_s();
var userName:String = "Nick";                  
var status:String = "Nick is using the App42 API";
socialService.updateSocialStatusForAll(userName,status, new callback());  
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("userName is " + social.getUserName());
		trace("status is " + social.getStatus());
	} 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
}  
Not Available

Facebook Link Post

Share your link on Facebook based on access token.

Required Parameters

accessToken - Facebook Access Token that has been received after authorization. link - Link which has to be post on Facebook wall. message - Message which has to be posted with the Link.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
socialService.facebookLinkPost(accessToken, link, message, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
socialService.FacebookLinkPost(accessToken, link, message, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		App42Response app42Response = (App42Response) response;    
		Console.WriteLine("app42Response is" + app42Response);
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
	
NSString *accessToken = @"<Enter Facebook Access Token>";
NSString *message = @"Welcome to ShepHertz";
NSString *link = @"http://www.shephertz.com";
App42Response *response = [socialService facebookLinkPost:accessToken link:link message:message];
NSLog(@"response=%@",response.strResponse);
NSLog(@"isResponseSuccess=%d",response.isResponseSuccess);
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
App42Response app42Response = socialService.facebookLinkPost(accessToken, link, message);
System.out.println("app42Response is" + app42Response);   
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
App42Response app42Response = socialService.facebookLinkPost(accessToken, link, message);
System.out.println("app42Response is" + app42Response);    
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.FacebookLinkPost(accessToken, link, message, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		App42Response app42Response = (App42Response) response;    
		App42Log.Console("app42Response is" + app42Response); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var accessToken = "<Enter Facebook Access Token>",
link = "http://www.shephertz.com/",
message =  "Welcome to ShepHertz",
result;
socialService.facebookLinkPost(accessToken, link,message,{
	success: function(object) {
	var app42esponse = JSON.parse(object);  
		result = app42esponse.app42.response;
		console.log("responses is " + result)
	},
	error: function(error) {
	}
});
local accessToken = "<Enter Facebook Access Token>"                        
local link = "http://www.shephertz.com/"                          
local message =  "Welcome to ShepHertz"   
local App42CallBack = {}
socialService:facebookLinkPost(accessToken, link, message,App42CallBack)
function App42CallBack:onSuccess(object)  
	print("Response is :"..object:getStrResponse());     
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* link = "http://www.shephertz.com/";
const char* message = "Welcome to ShepHertz";
const char* accessToken = "<Enter Facebook Access Token>";
socialService->FacebookLinkPost(accessToken, link, message, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
App42Response app42Response = socialService.FacebookLinkPost(accessToken, link, message);   
Console.WriteLine("app42Response is" + app42Response);
$accessToken = "<Enter Facebook Access Token>";
$link = "http://www.shephertz.com/";
$message =  "Welcome to ShepHertz";
$app42Response = $socialService->facebookLinkPost($accessToken, $link,$message);
print_r("Response is : ".$app42Response->toString());
const char* link = "http://www.shephertz.com/";
const char* message = "Welcome to ShepHertz";
const char* accessToken = "<Enter Facebook Access Token>";
socialService->FacebookLinkPost(accessToken, link, message, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
Not Available
var accessToken:String = "<Enter Facebook Access Token>";
var link:String = "http://www.shephertz.com/";
var message:String =  "Welcome to ShepHertz";
socialService.facebookLinkPost(accessToken, link, message,new callback()); 
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var app42Response:App42Response = App42Response(response);
		trace("app42Response is : " + app42Response);
	} 
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception is : "+ exception);  
	}  
}  
Not Available

Facebook Link Post With Custom Thumbnail

Share your link on Facebook based on custom image and message.

Required Parameters

accessToken - Facebook Access Token that has been received after authorization. link - Link which has to be post on Facebook. message - Message which has to be posted with the Link. pictureUrl - Your thumbnail image url which you want to share on Facebook. fileName - Name of your File which you have share on Facebook. description - Description of your file and Post.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
String pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String fileName = "Buddy Image";
String description =  "Welcome to ShepHertz Home Page";
socialService.facebookLinkPostWithCustomThumbnail(accessToken, link, message, pictureUrl, fileName, description, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
String pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String fileName = "Buddy Image";
String description =  "Welcome to ShepHertz Home Page";
socialService.FacebookLinkPostWithCustomThumbnail(accessToken, link, message, pictureUrl, fileName, description, new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		App42Response app42Response = (App42Response) response;    
		Console.WriteLine("app42Response is" + app42Response);
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
	
NSString *accessToken = "<Enter Facebook Access Token>";
NSString *link = @"http://www.shephertz.com";
NSString *message =  "Welcome to ShepHertz";
NSString *pictureUrl = @"http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
NSString *fileName = @"Buddy Image";
NSString *description = @"Welcome to ShepHertz Home Page";

App42Response *response = [socialService facebookLinkPostWithCustomThumbnail:accessToken link:link message:message pictureUrl:pictureUrl fileName:fileName description:description];
NSLog(@"response=%@",response.strResponse);
NSLog(@"isResponseSuccess=%d",response.isResponseSuccess);
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
String pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String fileName = "Buddy Image";
String description =  "Welcome to ShepHertz Home Page";
App42Response app42Response = socialService.facebookLinkPostWithCustomThumbnail(accessToken, link, message, pictureUrl, fileName, description);		
System.out.println("app42Response is" + app42Response);
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
String pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String fileName = "Buddy Image";
String description =  "Welcome to ShepHertz Home Page";
App42Response app42Response = socialService.facebookLinkPostWithCustomThumbnail(accessToken, link, message, pictureUrl, fileName, description);		
System.out.println("app42Response is" + app42Response);
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
String pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String fileName = "Buddy Image";
String description =  "Welcome to ShepHertz Home Page";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.FacebookLinkPostWithCustomThumbnail(accessToken, link, message, pictureUrl, fileName, description, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		App42Response app42Response = (App42Response) response;    
		App42Log.Console("app42Response is" + app42Response); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var accessToken = "<Enter Facebook Access Token>",
link = "http://www.shephertz.com/",
message =  "Welcome to ShepHertz",
pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png",
fileName = "Buddy Image",
description =  "Welcome to ShepHertz Home Page",
app42Response;
socialService.facebookLinkPostWithCustomThumbnail(accessToken, link,message,pictureUrl, fileName, description,{
	success: function(object) {
	var result = JSON.parse(object);  
		app42Response = result.app42.response;
		console.log("app42Response is : " + app42Response)
	},
	error: function(error) {
	}
});
local accessToken = "<Enter Facebook Access Token>"
local link = "http://www.shephertz.com/"
local message =  "Welcome to ShepHertz"
local pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png"
local fileName = "Buddy Image"
local description =  "Welcome to ShepHertz Home Page"
local App42CallBack = {}
socialService:facebookLinkPostWithCustomThumbnail(accessToken,link,message,pictureUrl,fileName, description,App42CallBack)
function App42CallBack:onSuccess(object)  
	print("Response is :"..object:getStrResponse());     
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* link = "http://www.shephertz.com/";
const char* message = "Welcome to ShepHertz";
const char* accessToken = "<Enter Facebook Access Token>";
const char* pictureUrl = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
const char* fileName = "Buddy Image";
const char* description = "Welcome to ShepHertz Home Page";
socialService->FacebookLinkPostWithCustomThumbnail(accessToken, link, message,pictureUrl,fileName,description, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
 
String accessToken = "<Enter Facebook Access Token>";
String link = "http://www.shephertz.com/";
String message =  "Welcome to ShepHertz";
String pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String fileName = "Buddy Image";
String description =  "Welcome to ShepHertz Home Page";
App42Response app42Response = socialService.FacebookLinkPostWithCustomThumbnail(accessToken, link, message, pictureUrl, fileName, description);   
Console.WriteLine("app42Response is" + app42Response);
$accessToken = "<Enter Facebook Access Token>";
$link = "http://www.shephertz.com/";
$message =  "Welcome to ShepHertz";
$pictureUrl="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
$fileName = "Buddy Image";
$description =  "Welcome to ShepHertz Home Page";
$app42Response = $socialService->facebookLinkPostWithCustomThumbnail($accessToken,$link,$message,$pictureUrl,$fileName,$description);
print_r("Response is : ".$app42Response->toString());
const char* link = "http://www.shephertz.com/";
const char* message = "Welcome to ShepHertz";
const char* accessToken = "<Enter Facebook Access Token>";
const char* pictureUrl = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
const char* fileName = "Buddy Image";
const char* description = "Welcome to ShepHertz Home Page";
socialService->FacebookLinkPostWithCustomThumbnail(accessToken, link, message,pictureUrl,fileName,description, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
Not Available
var accessToken:String = "<Enter Facebook Access Token>";
var link:String = "http://www.shephertz.com/";
var message:String =  "Welcome to ShepHertz";
var pictureUrl:String="http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
var fileName:String = "Buddy Image";
var description:String =  "Welcome to ShepHertz Home Page";
socialService.facebookLinkPostWithCustomThumbnail(accessToken, link, message, pictureUrl, fileName, description,new callback());
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var app42Response:App42Response = App42Response(response);
		trace("app42Response is : " + app42Response);
	} 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
}  
Not Available

Get Facebook Profile

Fetch the profile info likes profile picture ,facebookId and name of the user based on Facebook access token.

Required Parameters

accessToken - Access Token of the user for which Profile Info has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String accessToken = "<Enter Facebook Access Token>";
socialService.getFacebookProfile(accessToken, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println("FacebookAccessToken is:"+social.getFacebookAccessToken());
	System.out.println("facebookProfileId is : " + social.getFacebookProfile().getId());
	System.out.println("facebookProfileName is : " + social.getFacebookProfile().getName());   
	System.out.println("facebookProfileImage is : " + social.getFacebookProfile().getPicture());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String accessToken = "<Enter Facebook Access Token>";
socialService.GetFacebookProfile(accessToken, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;  
		Console.WriteLine("facebookProfileId is : " + social.GetFacebookProfile().GetId());
		Console.WriteLine("facebookProfileName is : " + social.GetFacebookProfile().GetName());   
		Console.WriteLine("facebookProfileImage is : " + social.GetFacebookProfile().GetPicture()); 
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
	
NSString *accessToken = "<Enter Facebook Access Token>";
Social *social = [socialService getFacebookProfile:accessToken];
NSLog(@"Name=%@",social.facebookProfile.name);
NSLog(@"Picture=%@",social.facebookProfile.picture);
NSLog(@"Id=%@",social.facebookProfile.fbId);
String accessToken = "<Enter Facebook Access Token>";
Social social = socialService.getFacebookProfile(accessToken);
System.out.println("facebookProfileId is : " + social.getFacebookProfile().getId());
System.out.println("facebookProfileName is : " + social.getFacebookProfile().getName());   
System.out.println("facebookProfileImage is : " + social.getFacebookProfile().getPicture()); 
String accessToken = "<Enter Facebook Access Token>";
Social social = socialService.getFacebookProfile(accessToken);
System.out.println("FacebookAccessToken is:"+social.getFacebookAccessToken());
System.out.println("facebookProfileId is : " + social.getFacebookProfile().getId());
System.out.println("facebookProfileName is : " + social.getFacebookProfile().getName());   
System.out.println("facebookProfileImage is : " + social.getFacebookProfile().getPicture());
String accessToken = "<Enter Facebook Access Token>";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.GetFacebookProfile(accessToken, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social social = (Social) response;    
		App42Log.Console("facebookProfileId is : " + social.GetFacebookProfile().GetId());
		App42Log.Console("facebookProfileName is : " + social.GetFacebookProfile().GetName());   
		App42Log.Console("facebookProfileImage is : " + social.GetFacebookProfile().GetPicture()); 
		
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var accessToken = "<Enter Facebook Access Token>",
social;
socialService.getFacebookProfile(accessToken,{
	success: function(object) {
	var response = JSON.parse(object);  
		social = response.app42.response.social;
		console.log("facebookProfileId is : " + social.facebookProfile.id)
		console.log("facebookProfileName is : " + social.facebookProfile.name)
		console.log("facebookProfileImage is : " + social.facebookProfile.picture)
	},
	error: function(error) {
	}
});
local accessToken = "<Enter Facebook Access Token>"
local App42CallBack = {}
socialService:getFacebookProfile(accessToken,App42CallBack)
function App42CallBack:onSuccess(object)  
	print("FacebookAccessToken is:"..object:getFacebookAccessToken());
	print("Id is : " ..object:getFacebookProfile():getId());  
	print("Picture is :" ..object:getFacebookProfile():getPicture());  
	print("Name is : " ..object:getFacebookProfile():getName());    
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* accessToken = "<Enter Facebook Access Token>";
socialService->GetFacebookProfile(accessToken, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        /**
         * Getting facebook profile
         */
        printf("\nName=%s", app42SocialResponse->facebookProfile.getName().c_str());
        printf("\nFbId=%s", app42SocialResponse->facebookProfile.getFbId().c_str());
        printf("\nPicture=%s", app42SocialResponse->facebookProfile.getPicture().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
String accessToken = "<Enter Facebook Access Token>";
Social social = socialService.GetFacebookProfile(accessToken);
Console.WriteLine("facebookProfileId is : " + social.GetFacebookProfile().GetId());
Console.WriteLine("facebookProfileName is : " + social.GetFacebookProfile().GetName());   
Console.WriteLine("facebookProfileImage is : " + social.GetFacebookProfile().GetPicture()); 
$accessToken = "<Enter Facebook Access Token>";
$social = $socialService->getFacebookProfile($accessToken);
print_r("FacebookAccessToken is:".$social->getFacebookAccessToken());
print_r("facebookProfileId is : ".$social->getFacebookProfile()->getId());
print_r("facebookProfileName is : " .$social->getFacebookProfile()->getName());
print_r("facebookProfileImage is : ".$social->getFacebookProfile()->getPicture());
const char* accessToken = "<Enter Facebook Access Token>";
socialService->GetFacebookProfile(accessToken, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        /**
         * Getting facebook profile
         */
        printf("\nName=%s", app42SocialResponse->facebookProfile.getName().c_str());
        printf("\nFbId=%s", app42SocialResponse->facebookProfile.getFbId().c_str());
        printf("\nPicture=%s", app42SocialResponse->facebookProfile.getPicture().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
Not Available
var accessToken:String = "<Enter Facebook Access Token>";
socialService.getFacebookProfile(accessToken,new callback());
public class callback implements App42CallBack  
{  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);
		trace("facebookProfileName is : " + FacebookProfile(social.getFaceBookProfile()).getName());
		trace("facebookProfileId is : " + FacebookProfile(social.getFaceBookProfile()).getId());
		trace("facebookProfileImage is : " + FacebookProfile(social.getFaceBookProfile()).getPicture());
	}  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
}  
Not Available

Facebook Publish Stream

Share your file on Facebook wall based on Facebook access token.

Required Parameters

accessToken - Facebook Access Token that has been received after authorization. fileName - Name of the file which you want to upload. filePath - Local path of the file. message - Message which has to be posted with the Link.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String accessToken = "<Enter Facebook Access Token>";
String fileName = "Buddy Image";
String filePath = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String message =  "Welcome to ShepHertz";
socialService.facebookPublishStream(accessToken,fileName,filePath,message,new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ; 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String accessToken = "<Enter Facebook Access Token>";
String fileName = "Buddy Image";
String filePath = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String message =  "Welcome to ShepHertz";
socialService.FacebookPublishStream(accessToken, fileName, filePath, message, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception is : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		App42Response app42Response = (App42Response) response;    
		Console.WriteLine("app42Response is" + app42Response);
	}  
}  
	
NSString *accessToken = @"<Enter Facebook Access Token>";
NSString *fileName = @"Buddy Image";
NSString *filePath = @"http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
NSString *message =  @"Welcome to ShepHertz";
App42Response *response = [socialService facebookPublishStream:accessToken fileName:fileName filePath:filePath message:message];
NSLog(@"response=%@",response.strResponse);
NSLog(@"isResponseSuccess=%d",response.isResponseSuccess);

String accessToken = "<Enter Facebook Access Token>";
String fileName = "Buddy Image";
String filePath = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String message =  "Welcome to ShepHertz";
App42Response social = socialService.facebookPublishStream(accessToken, fileName, filePath, message);
String jsonResponse = social.toString();    
String accessToken = "<Enter Facebook Access Token>";
String fileName = "Buddy Image";
String filePath = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String message =  "Welcome to ShepHertz";
App42Response social = socialService.facebookPublishStream(accessToken, fileName, filePath, message);
System.out.println("response is " + social) ; 
String jsonResponse = social.toString();  
String accessToken = "<Enter Facebook Access Token>";
String fileName = "Buddy Image";
String filePath = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String message =  "Welcome to ShepHertz";
App42Log.SetDebug(true);		//Print output in your editor console
socialService.FacebookPublishStream(accessToken, fileName, filePath, message, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		App42Response app42Response = (App42Response) response;    
		App42Log.Console("app42Response is" + app42Response);
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var accessToken = "<Enter Facebook Access Token>",              
fileName = "Buddy Image",
filePath = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png",
message =  "Welcome to ShepHertz",
app42Response;
socialService.facebookPublishStream(accessToken, fileName, filePath, message,{
	success: function(object) {
	var response = JSON.parse(object);  
		app42Response = response.app42.response;
		console.log("app42Response is : " + app42Response)
	},
	error: function(error) {
	}
});
Coming Soon
const char* accessToken = "<Enter Facebook Access Token>";
const char* filePath = "Your File Path";
const char* fileName = "<Your_file_name>";
const char* message = "Welcome to ShepHertz";
socialService->FacebookPublishStream(accessToken, fileName, filePath.c_str(), message, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}  
String accessToken = "<Enter Facebook Access Token>";
String fileName = "Buddy Image";
String filePath = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
String message =  "Welcome to ShepHertz";
App42Response app42Response = socialService.FacebookPublishStream(accessToken, fileName, filePath, message);    
Console.WriteLine("app42Response is" + app42Response);
$accessToken = "<Enter Facebook Access Token>";
$fileName = "Buddy Image";
$filePath = "http://api.shephertz.com/images/cloud-api-services/app42-cloud-api-services.png";
$message =  "Welcome to ShepHertz";
$app42Response = $socialService->facebookPublishStream($accessToken,$fileName, $filePath, $message);
print_r("Response is : ".$app42Response->toString());
const char* accessToken = "<Enter Facebook Access Token>";
const char* filePath = "Your File Path";
const char* fileName = "<Your_file_name>";
const char* message = "Welcome to ShepHertz";
socialService->FacebookPublishStream(accessToken, fileName, filePath.c_str(), message, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}  
Not Available
Coming soon
Not Available

Get Facebook Profiles From Ids

Get the Facebook profile info for the given Id’s.

Required Parameters

facebookIds - Facebook id(s) of the user(s) for which Facebook info is to fetch.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
ArrayList<String> facebookIds  = new ArrayList<String>();
facebookIds.add("<Enter the facebook ids>");
facebookIds.add("<Enter the facebook ids>");
socialService.getFacebookProfilesFromIds(facebookIds,	new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	for(int i= 0; i< social.getPublicProfile().size();i++)
	{
		System.out.println("Facebook User Id is : " + social.getPublicProfile().get(i).getId());
		System.out.println("Facebook User Name is : " + social.getPublicProfile().get(i).getName());
		System.out.println("Facebook User Picture is : " + social.getPublicProfile().get(i).getPicture());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
IList<String> facebookIds  = new List<String>();
facebookIds.Add("<Enter the facebook id>");
facebookIds.Add("<Enter the facebook id>");
socialService.GetFacebookProfilesFromIds(facebookIds, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception is : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Social  social  = (Social) response;    
		for(int i = 0; i < social.GetPublicProfile().Count; i++)
		{
			Console.WriteLine("Facebook User Id is : " + social.GetPublicProfile()[i].GetId());
			Console.WriteLine("Facebook User Name is : " + social.GetPublicProfile()[i].GetName());
			Console.WriteLine("Facebook User Picture is : " + social.GetPublicProfile()[i].GetPicture());
		}
		Console.WriteLine("Social JSONResponse is  " + social);
	}  
}  
NSArray *facebookIds = [NSArray arrayWithObjects:@"<Enter the facebook id>",@"<Enter the facebook id>",nil];
Social *social = [socialService getFacebookProfilesFromIds:facebookIds];

for (PublicProfile *publicProfile in social.publicProfile)
{
    NSLog(@"Name=%@",publicProfile.name);
    NSLog(@"Picture=%@",publicProfile.picture);
    NSLog(@"Id=%@",publicProfile.fbId);
} 
Vector facebookIds  = new Vector();
facebookIds.addElement("<Enter the facebook id>");
facebookIds.addElement("<Enter the facebook id>");
Social  social  = socialService.getFacebookProfilesFromIds(facebookIds);
for(int i = 0; i < social.getPublicProfile().size(); i++)
{
	System.out.println("Facebook User Id is : " + ((Social.PublicProfile)social.getPublicProfile().elementAt(i)).getId());
	System.out.println("Facebook User Name is : " + ((Social.PublicProfile)social.getPublicProfile().elementAt(i)).getName());
	System.out.println("Facebook User Picture is : " + ((Social.PublicProfile)social.getPublicProfile().elementAt(i)).getPicture());
}
ArrayList<String> facebookIds  = new ArrayList<String>();
facebookIds.add("<Enter the facebook ids>");
facebookIds.add("<Enter the facebook ids>");
Social  social  = socialService.getFacebookProfilesFromIds(facebookIds);
for(int i= 0; i< social.getPublicProfile().size();i++)
{
	System.out.println("Facebook User Id is : " + social.getPublicProfile().get(i).getId());
	System.out.println("Facebook User Name is : " + social.getPublicProfile().get(i).getName());
	System.out.println("Facebook User Picture is : " + social.getPublicProfile().get(i).getPicture());
}
IList<String> facebookIds  = new List<String>();
facebookIds.Add("<Enter the facebook id>");
facebookIds.Add("<Enter the facebook id>");
App42Log.SetDebug(true);		//Print output in your editor console
socialService.GetFacebookProfilesFromIds(facebookIds, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Social  social  = (Social) response;    
		for(int i = 0; i < social.GetPublicProfile().Count; i++)
		{
			App42Log.Console("Facebook User Id is : " + social.GetPublicProfile()[i].GetId());
			App42Log.Console("Facebook User Name is : " + social.GetPublicProfile()[i].GetName());
			App42Log.Console("Facebook User Picture is : " + social.GetPublicProfile()[i].GetPicture());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Coming Soon
local facebookIds={}
facebookIds[1]="<Enter the facebook id>";   
facebookIds[2]="<Enter the facebook id>";     
local App42CallBack = {}     
socialService:getFacebookProfilesFromIds(facebookIds,App42CallBack)
function App42CallBack:onSuccess(object)  
	if table.getn(object:getPublicProfile()) >1 then   
		for i=1,table.getn(object:getPublicProfile()) do  
			print("Id is : " ..object:getPublicProfile()[i]:getId());  
			print("Picture is :" ..object:getPublicProfile()[i]:getPicture());  
			print("Name is : " ..object:getPublicProfile()[i]:getName());  
		end  
	else
		print("Id is : " ..object:getPublicProfile():getId());  
		print("Picture is :" ..object:getPublicProfile():getPicture());  
		print("Name is : " ..object:getPublicProfile():getName());  
	end     
end
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
vector<string> facebookIds;
facebookIds.push_back("<Enter the facebook id>");
facebookIds.push_back("<Enter the facebook id>");
socialService->GetFacebookProfilesFromIds(facebookIds, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        /**
         * Getting friend's public profile
         */
        vector<App42PublicProfile> publicProfile = app42SocialResponse->publicProfile;
        for(std::vector<App42PublicProfile>::iterator it = publicProfile.begin(); it != publicProfile.end(); ++it)
        {
            printf("\nFriendId=%s",it->getFbId().c_str());
            printf("\nName=%s\n",it->getName().c_str());
            printf("\nPictureUrl=%s\n",it->getPicture().c_str());
        }
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
IList<String> facebookIds = new List<String>();
facebookIds.Add("<Enter the facebook id>");
facebookIds.Add("<Enter the facebook id>");
Social social = socialService.GetFacebookProfilesFromIds(facebookIds);
for(int i = 0; i < social.GetPublicProfile().Count; i++)
{
	Console.WriteLine("Facebook User Id is : " + social.GetPublicProfile()[i].GetId());
	Console.WriteLine("Facebook User Name is : " + social.GetPublicProfile()[i].GetName());
	Console.WriteLine("Facebook User Picture is : " + social.GetPublicProfile()[i].GetPicture());
}
$facebookIds =array();
array_push($facebookIds, "<Enter the facebook id>");
array_push($facebookIds, "<Enter the facebook id>");
$social = $socialService->getFacebookProfilesFromIds($facebookIds);
$list=$social->getPublicProfile();
foreach($list as $publicList)
{
	print_r("Facebook User Id is :".$publicList->getId());
	print_r("Facebook User Name is : ".$publicList->getName());
	print_r("Facebook User Picture is : ".$publicList->getPicture());
}
vector<string> facebookIds;
facebookIds.push_back("<Enter the facebook id>");
facebookIds.push_back("<Enter the facebook id>");
socialService->GetFacebookProfilesFromIds(facebookIds, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        printf("\nResponse Body=%s",app42SocialResponse->getBody().c_str());
        /**
         * Getting friend's public profile
         */
        vector<App42PublicProfile> publicProfile = app42SocialResponse->publicProfile;
        for(std::vector<App42PublicProfile>::iterator it = publicProfile.begin(); it != publicProfile.end(); ++it)
        {
            printf("\nFriendId=%s",it->getFbId().c_str());
            printf("\nName=%s\n",it->getName().c_str());
            printf("\nPictureUrl=%s\n",it->getPicture().c_str());
        }
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
    }
}
Coming Soon 
var facebookIds:Array = new Array();
facebookIds.push("<Enter the facebook ids>");
facebookIds.push("<Enter the facebook ids>");
socialService.getFacebookProfilesFromIds(facebookIds ,new callback()); 
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var social:Social = Social(response);				
		if(social.getPublicProfile().length > 0)
		{
			for(var i:int=0;i<social.getPublicProfile().length;i++)
			{
				trace("Facebook User id is " + PublicProfile(social.getPublicProfile()[i]).getId());
				trace("Facebook User Name is : " + PublicProfile(social.getPublicProfile()[i]).getName());
				trace("Facebook User picture is " + PublicProfile(social.getPublicProfile()[i]).getPicture());
			}
		}	
	}  
}
Not Available

Exception Handling

The functions available under Social API can throw some exceptions in abnormal conditions. Example of the same has been given below. E.g. If App developer is linking the User Twitter account name who has not authorized the app to use his account, the function will throw the App42Exception (as shown below) with message as “Not Found” and the appErrorCode as “3800” and the details as “Twitter App Credentials (ConsumerKey / ConsumerSecret) does not exist”.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String status = "Nick is using the App42 API";
socialService.updateTwitterStatus(userName, status, new App42CallBack() {
public void onSuccess(Object response) 
{
	Social social  = (Social)response;
	System.out.println(social);
	System.out.println("userName is :" + social.getUserName());  
	System.out.println("Status is : " + social.getStatus()); 
}
public void onException(Exception ex) 
{
	App42Exception exception = (App42Exception)ex;
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 3800)
	{
	// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
	}
	else if(appErrorCode  == 3801)
	{
	// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
	}
	else if(appErrorCode  == 3802)
	{
	// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
	}
	else if(appErrorCode  == 3803)
	{
	// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
	}
	else if(appErrorCode == 1401)
	{
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
	// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); 
	}
});	       
String userName = "Nick";
String status = "Nick is using the App42 API";
socialService.UpdateTwitterStatus(userName, status, new Callback()); 
public class Callback : App42Callback  
{   
	public void OnException(App42Exception exception)  
	{  
		int appErrorCode = exception.GetAppErrorCode();
		int httpErrorCode = exception.GetHttpErrorCode();
		if(appErrorCode == 3800)
		{
			// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
		}
		else if(appErrorCode  == 3801)
		{
			// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
		}
		else if(appErrorCode  == 3802)
		{
			// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
		}
		else if(appErrorCode  == 3803)
		{
			// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
		}
		else if(appErrorCode == 1401)
		{
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500)
		{
			// handle here for Internal Server Error
		}
		String jsonText = exception.GetMessage(); 
	}  
	public void OnSuccess(Object response)  
	{  
		Social social = (Social) response;
		String jsonResponse = social.ToString();  
	}  
} 
	
NSString *userName = @"Nick";
NSString *status = @"Nick is using the App42 API";
@try
{
	Social *social = [socialService updateTwitterStatus:userName status:status]; 
} 
@catch(App42Exception *ex) 
{
	int appErrorCode = ex.appErrorCode;
	int httpErrorCode = ex.httpErrorCode;
	if(appErrorCode == 3800)
	{
		// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
	}
	else if(appErrorCode  == 3801)
	{
		// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
	}
	else if(appErrorCode  == 3802)
	{
		// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
	}
	else if(appErrorCode  == 3803)
	{
		// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
	}
	else if(appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}
	NSString *jsonText = ex.reason; 	
}                                                
String userName = "Nick";
String status = "Nick is using the App42 API";
try
{
	Social social = socialService.updateTwitterStatus(userName, status);
}
catch(App42Exception ex) 
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 3800)
	{
		// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
	}
	else if(appErrorCode  == 3801)
	{
		// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
	}
	else if(appErrorCode  == 3802)
	{
		// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
	}
	else if(appErrorCode  == 3803)
	{
		// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
	}
	else if(appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); 	
}    
String userName = "Nick";
String status = "Nick is using the App42 API";
try
{
	Social social = socialService.updateTwitterStatus(userName, status);
}
catch(App42Exception ex) 
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 3800)
	{
		// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
	}
	else if(appErrorCode  == 3801)
	{
		// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
	}
	else if(appErrorCode  == 3802)
	{
		// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
	}
	else if(appErrorCode  == 3803)
	{
		// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
	}
	else if(appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); 	
}
Coming Soon
var userName = "Nick",
appErrorCode ,
status = "Nick is using the App42 API";
socialService.updateTwitterStatus(userName, status,{
	success: function(object) {
	},
	error: function(error) 
	{
		var socialObj = JSON.parse(error);
		appErrorCode = socialObj.app42Fault.appErrorCode;
		if(appErrorCode == 3800)
		{
			// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
		}
		else if(appErrorCode  == 3801)
		{
			// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
		}
		else if(appErrorCode  == 3802)
		{
			// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
		}
		else if(appErrorCode  == 3803)
		{
			// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
		}
		else if(appErrorCode == 1401)
		{
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500)
		{
			// handle here for Internal Server Error
		}
	}
});
local userName = "Nick"
local status = "Nick is using the App42 API"
local App42CallBack = {}
socialService:updateTwitterStatus(userName, status ,App42CallBack)
function App42CallBack:onSuccess(object)
	print("Response Success is "..object:getResponseSuccess())
end
function App42CallBack:onException(exception)
	local appErrorCode = exception:getAppErrorCode()
	if appErrorCode == 3800 then
		-- Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
	elseif appErrorCode  == 3801 then
		-- Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
	elseif appErrorCode  == 3802 then
		-- Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
	elseif appErrorCode  == 3803 then
		-- Handle here for Bad Request (The Twitter Access Credentials are invalid.)
	elseif appErrorCode == 1401 then
		-- handle here for Client is not authorized
	elseif appErrorCode == 1500 then
		-- handle here for Internal Server Error
	end
end
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateTwitterStatus(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        
        // Handle success response here
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
        int appErrorCode = app42SocialResponse->appErrorCode;
		int httpErrorCode = app42SocialResponse->httpErrorCode;
		if(appErrorCode == 3800)
		{
			// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
		}
		else if(appErrorCode  == 3801)
		{
			// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
		}
		else if(appErrorCode  == 3802)
		{
			// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
		}
		else if(appErrorCode  == 3803)
		{
			// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
		}
		else if(appErrorCode == 1401)
		{
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500)
		{
			// handle here for Internal Server Error
		}
    }
}
String userName = "Nick";
String status = "Nick is using the App42 API";
try
{
	Social social = socialService.UpdateTwitterStatus(userName, status);
}
catch(App42Exception ex) 
{
	int appErrorCode = ex.GetAppErrorCode();
	int httpErrorCode = ex.GetHttpErrorCode();
	if(appErrorCode == 3800)
	{
		// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
	}
	else if(appErrorCode  == 3801)
	{
		// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
	}
	else if(appErrorCode  == 3802)
	{
		// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
	}
	else if(appErrorCode  == 3803)
	{
		// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
	}
	else if(appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}
	String jsonText = ex.GetMessage(); 	
}    
$userName = "Nick";
$status = "Nick is using the App42 API";
try
{
	$social = $socialService->updateTwitterStatus($userName, $status);
} 
catch(App42Exception $ex) 
{
	$appErrorCode = $ex->getAppErrorCode();
	$httpErrorCode = $ex->getHttpErrorCode();
	if($appErrorCode == 3800)
	{
		// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
	}
	else if($appErrorCode  == 3801)
	{
		// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
	}
	else if($appErrorCode  == 3802)
	{
		// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
	}
	else if($appErrorCode  == 3803)
	{
		// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
	}
	else if($appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if($appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}
	$jsonText = $ex->getMessage(); 	
}                          
const char* userName = "Nick";
const char* status = "Nick is using the App42 API";
socialService->UpdateTwitterStatus(userName, status, this, app42callfuncND_selector(Sample_Class::onSocialServiceRequestCompleted));
void Sample_Class::onSocialServiceRequestCompleted(App42CallBack *sender, void *response)
{
    App42SocialResponse *app42SocialResponse = (App42SocialResponse*)response;
    
    if(app42SocialResponse->isSuccess)
    {
        printf("\ncode=%d",app42SocialResponse->getCode());
        printf("\nisSuccess=%d",app42SocialResponse->isSuccess);
        
        // Handle success response here
    }
    else
    {
        printf("\nerrordetails:%s",app42SocialResponse->errorDetails.c_str());
        printf("\nerrorMessage:%s",app42SocialResponse->errorMessage.c_str());
        printf("\nappErrorCode:%d",app42SocialResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",app42SocialResponse->httpErrorCode);
        int appErrorCode = app42SocialResponse->appErrorCode;
		int httpErrorCode = app42SocialResponse->httpErrorCode;
		if(appErrorCode == 3800)
		{
			// Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
		}
		else if(appErrorCode  == 3801)
		{
			// Handle here for Bad Request (The request is Unauthorized with the provided credentials.)
		}
		else if(appErrorCode  == 3802)
		{
			// Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
		}
		else if(appErrorCode  == 3803)
		{
			// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
		}
		else if(appErrorCode == 1401)
		{
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500)
		{
			// handle here for Internal Server Error
		}
    }
}
Coming Soon
var userName:String = "Nick";                  
var status:String = "Nick is using the App42 API";
socialService.updateTwitterStatus(userName,status, new callback());    
public class callback implements App42CallBack    
{     
    public function onSuccess(response:Object):void    
    {    
       var social:Social = Social(response);  
        trace("response is :" + social)   
    }    
    public function onException(exception:App42Exception):void    
    {    
        var appErrorCode:int = exception.getAppErrorCode();    
        var httpErrorCode:int = exception.getHttpErrorCode();    
        if(appErrorCode == 3800)  
        {  
            // Handle here for Not Found (Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist.)
		}
        else if(appErrorCode  == 3802)  
        {  
            // Handle here for Not Found (Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account.)
		}
		else if(appErrorCode  == 3803)
		{
		// Handle here for Bad Request (The Twitter Access Credentials are invalid.)
		}
        else if(appErrorCode == 1401)  
        {  
            // handle here for Client is not authorized  
        }  
        else if(appErrorCode == 1500)  
        {  
            // handle here for Internal Server Error  
        }  
    }     
} 
Coming Soon

Error Codes

Functions in Session API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):

1400 - BAD REQUEST - The Request parameters are invalid 1401 - UNAUTHORIZED - Client is not authorized 1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again 3800 - NOT FOUND - Twitter App Credentials(ConsumerKey / ConsumerSecret) does not exist. 3802 - NOT FOUND - Twitter User Access Credentials does not exist. Please use linkUserTwitterAccount API to link the User Twitter account. 3803 - BAD REQUEST - The Twitter Access Credentials are invalid." + &lt;Exception Message&gt;. 3804 - NOT FOUND - Facebook App Credentials(ConsumerKey/ConsumerSecret) does not exist. 3805 - BAD REQUEST - The Facebook Access Credentials are invalid + &lt;Received Facebook Exception Message&gt;. 3806 - NOT FOUND - Facebook User Access Credentials does not exist. Please use linkUserFacebookAccount API to link the User facebook account. 3807 - NOT FOUND - LinkedIn App Credentials(ApiKey/SecretKey) does not exist. 3808 - BAD REQUEST - The Access Credentials are invalid + &lt;Exception Message&gt;. 3809 - NOT FOUND - LinkedIn User Access Credentials does not exist. Please use linkUserLinkedInAccount API to link the User LinkedIn account. 3810 - NOT FOUND - Social App Credentials do not exist. 3811 - NOT FOUND - User Social Access Credentials do not exist. Please use linkUserXXXXXAccount API to link the User Social account.