您的位置:首页 > 移动开发 > 微信开发

ShareSDK 取消分享到微信收藏

2016-05-25 14:29 561 查看
[ShareSDK
registerApp:@"XXXXXXXXXXXX"

          activePlatforms:@[

                            @(SSDKPlatformTypeSinaWeibo),

                            //@(SSDKPlatformTypeWechat)这酱紫就取消掉啦

                            @(SSDKPlatformSubTypeWechatSession),

                            @(SSDKPlatformSubTypeWechatTimeline)

                            ]

          onImport:^(SSDKPlatformType platformType)

          {

          switch (platformType)

           {

            case
SSDKPlatformTypeWechat:

                [ShareSDKConnector
connectWeChat:[WXApi
class]];

                break;

            case
SSDKPlatformTypeSinaWeibo:

                [ShareSDKConnector
connectWeibo:[WeiboSDK
class]];

                break;

            default:

                break;

           }

        } onConfiguration:^(SSDKPlatformType platformType,
NSMutableDictionary *appInfo) {

        switch (platformType)

        {

            case
SSDKPlatformTypeSinaWeibo:

                //设置新浪微博应用信息,其中authType设置为使用SSO+Web形式授权

                [appInfo SSDKSetupSinaWeiboByAppKey:@"392385374"

                                          appSecret:@"a03a797a471007411998ac4cf9b60237"

                                        redirectUri:@"http://www.sharesdk.cn"

                                           authType:SSDKAuthTypeBoth];

                break;

            case
SSDKPlatformTypeWechat:

                [appInfo SSDKSetupWeChatByAppId:@"wx7796f7b8a1277903"

                                      appSecret:@"da57bb8cec31960512dafa82cc6f7503"];

                break;

            default:

                break;

        }

    }];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: