String userName = "Nick";
String accessToken = "FACEBOOK ACCESS TOKEN";
App42Callback requestCallback = this; /* This function used the App42Callback interface */
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
SocialService socialService = api.BuildSocialService();
socialService.LinkUserFacebookAccount(userName,accessToken,requestCallback);
OnSuccess(Object obj)
{
Social social = (Social) obj;
String jsonResponse = social.ToString();
}
public class CallBack : App42Callback
{
public override void OnSuccess(Object obj)
{
Social social = (Social) obj;
//Do whatever you want with the object
}
public override void OnException(App42Exception e)
{
//Do whatever you want with the exception
}
}
String userName = "Nick";
String accessToken = "FACEBOOK ACCESS TOKEN";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
SocialService socialService = api.buildSocialService();
Social social = socialService.linkUserFacebookAccount(userName, accessToken);
String jsonResponse = social.toString();
String userName = "Nick";
String accessToken = "FACEBOOK ACCESS TOKEN";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
SocialService socialService = api.buildSocialService();
Social social = socialService.linkUserFacebookAccount(userName, accessToken);
String jsonResponse = social.toString();
NSString *userName = @"Nick";
NSString *accessToken = @"FACEBOOK ACCESS TOKEN";
ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init];
serviceAPIObj.apiKey = @"<API_KEY>";
serviceAPIObj.secretKey = @"<SECRET_KEY>";
SocialService *socialService = [serviceAPIObj buildSocialService];
Social *social = [socialService linkUserFacebookAccount:userName accessToken:accessToken);
NSString *jsonResponse = [social toString];
String userName = "Nick";
String accessToken = "FACEBOOK ACCESS TOKEN";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
SocialService socialService = api.buildSocialService();
Social social = socialService.linkUserFacebookAccount(userName, accessToken);
String jsonResponse = social.toString();
String userName = "Nick";
String accessToken = "FACEBOOK ACCESS TOKEN";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
SocialService socialService = api.BuildSocialService();
Social social = socialService.LinkUserFacebookAccount(userName, accessToken);
String jsonResponse = social.ToString();
userName = "Nick";
facebookAccessToken = "FACEBOOK ACCESS TOKEN";
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>");
socialService = api.buildSocialService();
social = socialService.link_user_facebook_account(userName,facebookAccessToken);
jsonResponse = social.to_s();
The request format for updateFacebookStatus is
URL : https://api.shephertz.com/cloud/1.0/social/facebook/updatestatus
Method : POST
QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP>
Accept : application/json
Content-Type : application/json
Body : {"app42": {"facebook": {"userName": "Nick","status": "Reviewing Faecbook APIs By Nick"}}}
$userName = "Nick";
$facebookAccessToken = "SD23435FF-m67CV2QqqizC6tKwS88R8K7YxTts54HPmUv4EfJC";
$api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
$socialService = $api->buildSocialService();
$social = $socialService->linkUserFacebookAccount($userName,$facebookAccessToken);
$jsonResponse = $social->toString();