美文网首页
QQ分享出现,安全校验不通过

QQ分享出现,安全校验不通过

作者: 野咪咕 | 来源:发表于2021-08-19 13:53 被阅读0次

    老项目直接 接入的 QQ互联SDK 

    官网地址 https://connect.qq.com

    TencentOpenAPI.framework

    TencentOpenApi_IOS_Bundle.bundle

    下载SDK 导入项目

    //出现问题是 UniversalLink 回调问题,重写这个方法- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler

    #pragma mark -- UniversalLink回调

    - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {

        // Demo处理手Q UniversalLink回调的示例代码

        if([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {

            NSURL *url = userActivity.webpageURL;

            if(url && [TencentOAuth CanHandleUniversalLink:url]) {

      //QQ分享 

                [QQApiInterface handleOpenUniversallink:url delegate:self];

                return [TencentOAuth HandleUniversalLink:url];

            }else {

           //微信

                return [WXApi handleOpenUniversalLink:userActivity delegate:self];

            }

        }

        

        return YES;

    }

    相关文章

      网友评论

          本文标题:QQ分享出现,安全校验不通过

          本文链接:https://www.haomeiwen.com/subject/xvaobltx.html