Skip to content

Instantly share code, notes, and snippets.

@cipolleschi
Created June 30, 2016 14:19
Show Gist options
  • Save cipolleschi/9437a1a9805a2e0f27642c3e5cd7d3f7 to your computer and use it in GitHub Desktop.
Save cipolleschi/9437a1a9805a2e0f27642c3e5cd7d3f7 to your computer and use it in GitHub Desktop.
export var IBAuthenticationManager = {
completeAuthenticationOfInstagramUserInfo_instagramCookies_asSecondaryAccount_challenge_completion:function(userInfo, cookies, asSecondaryAccount, challenge, completion){
self.context().APIManager().postLoginChallenge_instagramUserInfo_receiptEnabled_block(challenge, userInfo, self.context().settingsManager().settings().receiptVerificationEnabled(),
block("ORAPIResponse *", function(response){
if (response.result() != 1) {
if(response.serverErrorCode == 331){
utils.alert(""+response.serverErrorMessage().toJS());
completion(7)
return
}
completion(0);
return;
}
}))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment