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