当前位置: 首页>>代码示例>>Java>>正文


Java QZoneSsoHandler类代码示例

本文整理汇总了Java中com.umeng.socialize.sso.QZoneSsoHandler的典型用法代码示例。如果您正苦于以下问题:Java QZoneSsoHandler类的具体用法?Java QZoneSsoHandler怎么用?Java QZoneSsoHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


QZoneSsoHandler类属于com.umeng.socialize.sso包,在下文中一共展示了QZoneSsoHandler类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
private void init() {
    mController = UMServiceFactory.getUMSocialService("com.umeng.share");
    if (mListener != null) {
        mController.unregisterListener(mListener);
    }
    mListener = new MSnsPostListener();
    mController.registerListener(mListener);
    new UMWXHandler(mActivity, WX_APPID, WX_APPKEY).addToSocialSDK();
    new UMWXHandler(mActivity, WX_APPID, WX_APPKEY).setToCircle(true).addToSocialSDK();
    new QZoneSsoHandler(mActivity, "100530867", "d32ea174315e9c42bfbd481ac3b3fef6")
            .addToSocialSDK();
    new UMQQSsoHandler(mActivity, "100530867", "d32ea174315e9c42bfbd481ac3b3fef6")
            .addToSocialSDK();
    mController.getConfig().removePlatform(new SHARE_MEDIA[]{SHARE_MEDIA.TENCENT, SHARE_MEDIA
            .RENREN, SHARE_MEDIA.DOUBAN});
    mController.getConfig().setPlatformOrder(new SHARE_MEDIA[]{SHARE_MEDIA.SINA, SHARE_MEDIA
            .WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE, SHARE_MEDIA.QZONE, SHARE_MEDIA.QQ});
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:19,代码来源:ShareHelper.java

示例2: onClick

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
public void onClick(SHARE_MEDIA args) {
    switch (AnonymousClass4.$SwitchMap$com$umeng$socialize$bean$SHARE_MEDIA[args.ordinal()]) {
        case 1:
            this.mController.getConfig().setSsoHandler(new SinaSsoHandler());
            doSNSLogin(SHARE_MEDIA.SINA);
            return;
        case 2:
            this.mController.getConfig().setSsoHandler(new QZoneSsoHandler(this.mActivity,
                    "100530867", "d32ea174315e9c42bfbd481ac3b3fef6"));
            doSNSLogin(SHARE_MEDIA.QZONE);
            return;
        case 3:
            UMWXHandler wxHandler = new UMWXHandler(this.mActivity, ShareHelper.WX_APPID,
                    ShareHelper.WX_APPKEY);
            wxHandler.setRefreshTokenAvailable(false);
            this.mController.getConfig().setSsoHandler(wxHandler);
            doSNSLogin(SHARE_MEDIA.WEIXIN);
            return;
        default:
            return;
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:23,代码来源:SNSLogin.java

示例3: UMQQSsoHandler

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
private void 准备分享() {

        //        // 添加微信平台
        //        UMWXHandler wxHandler = new UMWXHandler(this, Common.APP_ID, Common.APP_SECRET);
        //        wxHandler.addToSocialSDK();
        //        // 支持微信朋友圈
        //        UMWXHandler wxCircleHandler = new UMWXHandler(this, Common.APP_ID, Common.APP_SECRET);
        //        wxCircleHandler.setToCircle(true);
        //        wxCircleHandler.addToSocialSDK();
        //QQ分享
        UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(this, "1105529778",
                "fZ1fXiLaOyNmvRe4");
        qqSsoHandler.addToSocialSDK();
        //QQ空间分享
        QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(this, "APP_ID",
                "APP kEY");
        qZoneSsoHandler.addToSocialSDK();
        //        //新浪微博
        //        SinaSsoHandler sinaSsoHandler = new SinaSsoHandler(this);
        //        sinaSsoHandler.addToSocialSDK();
    }
 
开发者ID:paradoxie,项目名称:UmengSocialLibrary,代码行数:22,代码来源:MainActivity.java

示例4: addQQQZonePlatform

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
/**
 * @功能描述 : 添加QQ平台支持 QQ分享的内容, 包含四种类型, 即单纯的文字、图片、音乐、视频. 参数说明 : title, summary,
 *       image url中必须至少设置一个, targetUrl必须设置,网页地址必须以"http://"开头 . title :
 *       要分享标题 summary : 要分享的文字概述 image url : 图片地址 [以上三个参数至少填写一个] targetUrl
 *       : 用户点击该分享时跳转到的目标地址 [必填] ( 若不填写则默认设置为友盟主页 )
 * @return
 */
private static void addQQQZonePlatform(Context context) {
	String appId = AppConstants.QQZONE_APPID;
	String appKey = AppConstants.QQZONE_APPKEY;
	// 添加QQ支持, 并且设置QQ分享内容的target url
	UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler((Activity) context,
			appId, appKey);
	qqSsoHandler.setTargetUrl("http://www.umeng.com/social");
	qqSsoHandler.addToSocialSDK();

	// 添加QZone平台
	QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(
			(Activity) context, appId, appKey);
	qZoneSsoHandler.addToSocialSDK();
}
 
开发者ID:shenhuanet,项目名称:LoginRegisterFramework,代码行数:22,代码来源:ShareUtils.java

示例5: initPlatforms

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
/**
 * 初始化分享相关的平台
 * 
 * @param activity
 */
private void initPlatforms(Activity activity) {
    // 添加QQ
    UMQQSsoHandler qqHandler = new UMQQSsoHandler(activity, "1104606393",
            "X4BAsJAVKtkDQ1zQ");
    qqHandler.addToSocialSDK();
    // 添加QZone平台
    QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(activity, "1104606393",
            "X4BAsJAVKtkDQ1zQ");
    qZoneSsoHandler.addToSocialSDK();
    // 添加微信平台
    UMWXHandler wechatHandler = new UMWXHandler(activity, "wx96110a1e3af63a39",
            "c60e3d3ff109a5d17013df272df99199");
    wechatHandler.addToSocialSDK();
    // 添加微信朋友圈平台
    UMWXHandler circleHandler = new UMWXHandler(activity, "wx96110a1e3af63a39",
            "c60e3d3ff109a5d17013df272df99199");
    circleHandler.setToCircle(true);
    circleHandler.addToSocialSDK();

    UMShareServiceFactory.getSocialService().getConfig()
            .setPlatforms(SHARE_MEDIA.WEIXIN_CIRCLE, SHARE_MEDIA.WEIXIN,
                    SHARE_MEDIA.QZONE, SHARE_MEDIA.QQ, SHARE_MEDIA.SINA);
    UMShareServiceFactory.getSocialService().getConfig()
            .setPlatformOrder(SHARE_MEDIA.WEIXIN_CIRCLE, SHARE_MEDIA.WEIXIN,
                    SHARE_MEDIA.QZONE, SHARE_MEDIA.QQ, SHARE_MEDIA.SINA);
}
 
开发者ID:umeng,项目名称:umeng_community_android,代码行数:32,代码来源:MainActivity.java

示例6: addQQQZonePlatform

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
/**
     * @功能描述 : 添加QQ平台支持 QQ分享的内容, 包含四种类型, 即单纯的文字、图片、音乐、视频.
     * 参数说明 : title, summary,image url中必须至少设置一个, targetUrl必须设置,网页地址必须以"http://"开头 .
     * title : 要分享标题 summary : 要分享的文字概述 image url : 图片地址 [以上三个参数至少填写一个]
     * targetUrl : 用户点击该分享时跳转到的目标地址 [必填] ( 若不填写则默认设置为友盟主页 )
     */
    private void addQQQZonePlatform(Context context, String targetUrl) {
//        String appId = "100424468";
        String appId = "1104980016";
//        String appKey = "c7394704798a158208a74ab60104f0ba";
        String appKey = "Dz9oJR8HGlmg6Prr";
        // 添加QQ支持, 并且设置QQ分享内容的target url
        UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler((Activity) context, appId, appKey);
        qqSsoHandler.setTargetUrl(targetUrl);
        qqSsoHandler.addToSocialSDK();

        // 添加QZone平台
        QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler((Activity) context, appId, appKey);
        qZoneSsoHandler.addToSocialSDK();
    }
 
开发者ID:Jude95,项目名称:Fishing,代码行数:21,代码来源:ShareManager.java

示例7: addQQQZonePlatform

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
/**
 * @功能描述 : 添加QQ平台支持 QQ分享的内容, 包含四种类型, 即单纯的文字、图片、音乐、视频. 参数说明 : title, summary,
 *       image url中必须至少设置一个, targetUrl必须设置,网页地址必须以"http://"开头 . title :
 *       要分享标题 summary : 要分享的文字概述 image url : 图片地址 [以上三个参数至少填写一个] targetUrl
 *       : 用户点击该分享时跳转到的目标地址 [必填] ( 若不填写则默认设置为友盟主页 )
 * @return
 */
private void addQQQZonePlatform(Activity context) {
	String appId = "100424468";
	String appKey = "c7394704798a158208a74ab60104f0ba";
	// 添加QQ支持, 并且设置QQ分享内容的target url
	UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(context, appId, appKey);
	qqSsoHandler.setTargetUrl("http://www.umeng.com/social");
	qqSsoHandler.addToSocialSDK();

	// 添加QZone平台
	QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(context, appId,
			appKey);
	qZoneSsoHandler.addToSocialSDK();
}
 
开发者ID:justingboy,项目名称:CouldBooks,代码行数:21,代码来源:UmengShare.java

示例8: completeUmeng

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
private void completeUmeng() {

        //添加QQ平台
        UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(getActivity(), "1104326437",
                "Jj4RMmh7LOSdOeSU");
        qqSsoHandler.addToSocialSDK();

        //添加QQ空间平台
        QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(getActivity(), "1104326437",
                "Jj4RMmh7LOSdOeSU");
        qZoneSsoHandler.addToSocialSDK();

        //设置新浪SSO handler
        controller.getConfig().setSsoHandler(new SinaSsoHandler());
        //设置腾讯微博SSO handler
        controller.getConfig().setSsoHandler(new TencentWBSsoHandler());

        String appId = "wxd2033153d9e5d21c";
        String appSecret = "9e07451fa60ee561bd688565aa5112cd";
        // 添加微信平台
        UMWXHandler wxHandler = new UMWXHandler(getActivity(),appId,appSecret);
        wxHandler.addToSocialSDK();
        // 支持微信朋友圈
        UMWXHandler wxCircleHandler = new UMWXHandler(getActivity(),appId,appSecret);
        wxCircleHandler.setToCircle(true);
        wxCircleHandler.addToSocialSDK();
    }
 
开发者ID:rantianhua,项目名称:ShuTuier,代码行数:28,代码来源:ShareFragment.java

示例9: addQQQZonePlatform

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
/**
 * @功能描述 : 添加QQ平台支持 QQ分享的内容, 包含四种类型, 即单纯的文字、图片、音乐、视频. 参数说明 : title, summary,
 *       image url中必须至少设置一个, targetUrl必须设置,网页地址必须以"http://"开头 . title :
 *       要分享标题 summary : 要分享的文字概述 image url : 图片地址 [以上三个参数至少填写一个] targetUrl
 *       : 用户点击该分享时跳转到的目标地址 [必填] ( 若不填写则默认设置为友盟主页 )
 * @return
 */
private void addQQQZonePlatform() {
	String appId = "100424468";
	String appKey = "c7394704798a158208a74ab60104f0ba";
	// 添加QQ支持, 并且设置QQ分享内容的target url
	UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(this, appId, appKey);
	qqSsoHandler.setTargetUrl(website);
	qqSsoHandler.addToSocialSDK();

	// 添加QZone平台
	QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(this, appId, appKey);
	qZoneSsoHandler.addToSocialSDK();
}
 
开发者ID:poomoo,项目名称:eDao,代码行数:20,代码来源:ShareActivity.java

示例10: shareToQZone

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
private void shareToQZone() {
    QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(getActivity(),
            Constants.QQ_APPID, Constants.QQ_APPKEY);
    qZoneSsoHandler.addToSocialSDK();
    QZoneShareContent qzone = new QZoneShareContent();
    // 设置分享文字
    qzone.setShareContent(getShareContent());
    // 设置点击消息的跳转URL
    qzone.setTargetUrl(getShareUrl());
    // 设置分享内容的标题
    qzone.setTitle(getShareTitle());
    // 设置分享图片
    // qzone.setShareImage(urlImage);
    mController.setShareMedia(qzone);
    mController.postShare(getActivity(), SHARE_MEDIA.QZONE,
            new SnsPostListener() {

                @Override
                public void onStart() {
                    AppContext.showToastShort(R.string.tip_start_share);
                }

                @Override
                public void onComplete(SHARE_MEDIA arg0, int arg1,
                                       SocializeEntity arg2) {
                    AppContext.showToastShort(R.string.tip_share_done);
                }
            });
}
 
开发者ID:blueelwang,项目名称:oschina-app,代码行数:30,代码来源:BaseDetailFragment.java

示例11: shareToQZone

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
private void shareToQZone() {
	QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(getActivity(),
			Constants.QQ_APPID, Constants.QQ_APPKEY);
	qZoneSsoHandler.addToSocialSDK();
	QZoneShareContent qzone = new QZoneShareContent();
	// 设置分享文字
	qzone.setShareContent(getShareContent());
	// 设置点击消息的跳转URL
	qzone.setTargetUrl(getShareUrl());
	// 设置分享内容的标题
	qzone.setTitle(getShareTitle());
	// 设置分享图片
	// qzone.setShareImage(urlImage);
	mController.setShareMedia(qzone);
	mController.postShare(getActivity(), SHARE_MEDIA.QZONE,
			new SnsPostListener() {

				@Override
				public void onStart() {
					AppContext.showToastShort(R.string.tip_start_share);
				}

				@Override
				public void onComplete(SHARE_MEDIA arg0, int arg1,
						SocializeEntity arg2) {
					AppContext.showToastShort(R.string.tip_share_done);
				}
			});
}
 
开发者ID:447491480,项目名称:ima_intellj,代码行数:30,代码来源:BaseDetailFragment.java

示例12: onCreate

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);


    // 设置分享内容
    mController.setShareContent("友盟社会化组件(SDK)让移动应用快速整合社交分享功能,http://www.umeng.com/social");
    // 设置分享图片, 参数2为图片的url地址
    mController.setShareMedia(new UMImage(this, "http://www.umeng.com/images/pic/banner_module_social.png"));


    String appId = "wx967daebe835fbeac";
    String appSecret = "5fa9e68ca3970e87a1f83e563c8dcbce";
    // 添加微信平台
    UMWXHandler wxHandler = new UMWXHandler(this, appId, appSecret);
    wxHandler.addToSocialSDK();
    // 添加微信朋友圈
    UMWXHandler wxCircleHandler = new UMWXHandler(this, appId, appSecret);
    wxCircleHandler.setToCircle(true);
    wxCircleHandler.addToSocialSDK();


    //qq
    //参数1为当前Activity,参数2为开发者在QQ互联申请的APP ID,参数3为开发者在QQ互联申请的APP kEY.
    UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(this, "100424468",
            "c7394704798a158208a74ab60104f0ba");
    qqSsoHandler.addToSocialSDK();

    //QQ空间
    //参数1为当前Activity,参数2为开发者在QQ互联申请的APP ID,参数3为开发者在QQ互联申请的APP kEY.
    QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(this, "100424468",
            "c7394704798a158208a74ab60104f0ba");
    qZoneSsoHandler.addToSocialSDK();

    //设置新浪SSO handler
    mController.getConfig().setSsoHandler(new SinaSsoHandler());


    mController.getConfig().removePlatform(SHARE_MEDIA.RENREN, SHARE_MEDIA.DOUBAN);
    Button button = (Button) findViewById(R.id.bt);
    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            mController.openShare(MainActivity.this, false);
        }
    });

}
 
开发者ID:103style,项目名称:shareTest,代码行数:50,代码来源:MainActivity.java

示例13: setShareContent

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
/**
 * 根据不同的平台设置不同的分享内容</br>
 */
private void setShareContent(Context context, String content, String targetUrl, String title, String imageUrl) {

    // 配置SSO
    mController.getConfig().setSsoHandler(new SinaSsoHandler());

    QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler((Activity) context, "1104980016", "Dz9oJR8HGlmg6Prr");
    qZoneSsoHandler.addToSocialSDK();
    mController.setShareContent(content);

    UMImage urlImage = new UMImage(context, imageUrl);

    //微信分享内容
    WeiXinShareContent weixinContent = new WeiXinShareContent();
    weixinContent.setShareContent(content);
    weixinContent.setTitle(title);
    weixinContent.setTargetUrl(targetUrl);
    weixinContent.setShareMedia(urlImage);
    mController.setShareMedia(weixinContent);

    // 设置朋友圈分享的内容
    CircleShareContent circleMedia = new CircleShareContent();
    circleMedia.setShareContent(content);
    circleMedia.setTitle(title);
    circleMedia.setShareMedia(urlImage);
    circleMedia.setTargetUrl(targetUrl);
    mController.setShareMedia(circleMedia);

    // 设置QQ空间分享内容
    QZoneShareContent qzone = new QZoneShareContent();
    qzone.setShareContent(content);
    qzone.setTargetUrl(targetUrl);
    qzone.setTitle(title);
    qzone.setShareImage(urlImage);
    mController.setShareMedia(qzone);

    // QQ分享内容
    QQShareContent qqShareContent = new QQShareContent();
    qqShareContent.setShareContent(content);
    qqShareContent.setTitle(title);
    qqShareContent.setShareMedia(urlImage);
    qqShareContent.setTargetUrl(targetUrl);
    mController.setShareMedia(qqShareContent);

    //新浪分享内容
    SinaShareContent sinaContent = new SinaShareContent();
    sinaContent.setShareContent(content);
    sinaContent.setShareImage(urlImage);
    mController.setShareMedia(sinaContent);
}
 
开发者ID:Jude95,项目名称:Fishing,代码行数:53,代码来源:ShareManager.java

示例14: initShare

import com.umeng.socialize.sso.QZoneSsoHandler; //导入依赖的package包/类
private void initShare() {
	// 添加微信平台
	UMWXHandler wxHandler = new UMWXHandler(WebDisplay.this, "1104819871", "uwPxPLJVBlwteKeK");
	wxHandler.addToSocialSDK();
	// 添加微信朋友圈
	UMWXHandler wxCircleHandler = new UMWXHandler(WebDisplay.this, "1104819871", "uwPxPLJVBlwteKeK");
	wxCircleHandler.setToCircle(true);
	wxCircleHandler.addToSocialSDK();
	
	/**
	 * 分享到QQ好友和控件
	 */
	// 参数1为当前Activity,参数2为开发者在QQ互联申请的APP ID,参数3为开发者在QQ互联申请的APP kEY.
	UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(WebDisplay.this, "1104819871",
			"uwPxPLJVBlwteKeK");
	qqSsoHandler.addToSocialSDK();
	QQShareContent qqShareContent = new QQShareContent();
	//设置分享文字
	qqShareContent.setShareContent("来自彩阅的分享-彩阅,精彩你的每一天!");
	//设置分享title
	qqShareContent.setTitle(title);
	//设置分享图片
	//qqShareContent.setShareImage(new UMImage(getActivity(), R.drawable.icon));
	//设置点击分享内容的跳转链接
	qqShareContent.setTargetUrl(url);
	mController.setShareMedia(qqShareContent);
	
	// 参数1为当前Activity,参数2为开发者在QQ互联申请的APP ID,参数3为开发者在QQ互联申请的APP kEY.
	QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(WebDisplay.this, "1104819871",
			"uwPxPLJVBlwteKeK");
	qZoneSsoHandler.addToSocialSDK();
	QZoneShareContent qzone = new QZoneShareContent();
	//设置分享文字
	qzone.setShareContent("来自彩阅的分享-彩阅,精彩你的每一天!");
	//设置点击消息的跳转URL
	qzone.setTargetUrl(url);
	//设置分享内容的标题
	qzone.setTitle(title);
	//设置分享图片
	//qzone.setShareImage(urlImage);
	mController.setShareMedia(qzone);
	
}
 
开发者ID:Grrsun,项目名称:colorread,代码行数:44,代码来源:WebDisplay.java


注:本文中的com.umeng.socialize.sso.QZoneSsoHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。