add login of tiktok
This commit is contained in:
parent
cfb3644517
commit
5f43cf5257
@ -113,7 +113,7 @@ static NSString * const kClientID =
|
||||
#pragma mark -- Sign In with TikTok
|
||||
- (void) signWithTikTok:(NSString *) funid {
|
||||
/* STEP 1: Create the request and set permissions */
|
||||
NSArray *scopes = [NSArray arrayWithObjects: @"user.info.basic,video.list", nil]; // list your scopes;
|
||||
NSArray *scopes = [NSArray arrayWithObjects: @"user.info.basic", @"video.list", nil]; // list your scopes;
|
||||
NSOrderedSet *scopesSet = [NSOrderedSet orderedSetWithArray:scopes];
|
||||
TikTokOpenSDKAuthRequest *request = [[TikTokOpenSDKAuthRequest alloc] init];
|
||||
request.permissions = scopesSet;
|
||||
@ -128,10 +128,12 @@ static NSString * const kClientID =
|
||||
if (resp.errCode == 0) {
|
||||
NSString *responseCode = resp.code;
|
||||
// Upload response code to your server and obtain user access token
|
||||
[self nativeCb:funid hasErr:NO dataStr:responseCode];
|
||||
NSLog(@"tiktok resp: %@", responseCode);
|
||||
} else {
|
||||
// User authorization failed. Handle errors
|
||||
NSLog(@"tiktok resp error: %@", resp.description);
|
||||
[self nativeCb:funid hasErr:YES dataStr: resp.description];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
<dict>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>7168682541145278470</string>
|
||||
<string>awqbuzh2qymmq8hs</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
@ -56,7 +56,7 @@
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Restore Wallet recovery key need Photo Libray</string>
|
||||
<key>TikTokAppID</key>
|
||||
<string>7168682541145278470</string>
|
||||
<string>awqbuzh2qymmq8hs</string>
|
||||
<key>UIApplicationExitsOnSuspend</key>
|
||||
<false/>
|
||||
<key>UILaunchStoryboardName~ipad</key>
|
||||
|
Binary file not shown.
@ -126,8 +126,8 @@
|
||||
filePath = "Classes_cocos/UIViewController+Wallet.mm"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "134"
|
||||
endingLineNumber = "134"
|
||||
startingLineNumber = "135"
|
||||
endingLineNumber = "135"
|
||||
landmarkName = "-signWithTikTok:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user