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


Java UMQQSsoHandler类代码示例

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


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

示例1: init

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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: UMQQSsoHandler

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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

示例3: useSocialLogin

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的package包/类
/**
 * 自定义自己的登录系统
 */
protected void useSocialLogin() {

    // 用户自定义的登录
    UMAuthService mLogin = UMLoginServiceFactory.getLoginService("umeng_login_impl");
    String appId = "1104606393";
    String appKey = "X4BAsJAVKtkDQ1zQ";
    // SSO 设置
    // mLogin.getConfig().setSsoHandler(new SinaSsoHandler());
    new UMQQSsoHandler(this, appId, appKey).addToSocialSDK();

    String wxappId = "wx96110a1e3af63a39";
    String wxappSecret = "c60e3d3ff109a5d17013df272df99199";
    new UMWXHandler(getApplicationContext(), wxappId,
            wxappSecret).addToSocialSDK();

    // 将登录实现注入到sdk中,key为umeng_login
    LoginSDKManager.getInstance().addAndUse(mLogin);

}
 
开发者ID:umeng,项目名称:umeng_community_android,代码行数:23,代码来源:MainActivity.java

示例4: shareToQQ

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的package包/类
protected void shareToQQ(SHARE_MEDIA media) {
    UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(getActivity(),
            Constants.QQ_APPID, Constants.QQ_APPKEY);
    qqSsoHandler.setTargetUrl(getShareUrl());
    qqSsoHandler.setTitle(getShareContent());
    qqSsoHandler.addToSocialSDK();
    mController.setShareContent(getShareContent());
    mController.postShare(getActivity(), media, 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,代码行数:22,代码来源:BaseDetailFragment.java

示例5: shareToQQ

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的package包/类
protected void shareToQQ(SHARE_MEDIA media) {
	UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(getActivity(),
			Constants.QQ_APPID, Constants.QQ_APPKEY);
	qqSsoHandler.setTargetUrl(getShareUrl());
	qqSsoHandler.setTitle(getShareContent());
	qqSsoHandler.addToSocialSDK();
	mController.setShareContent(getShareContent());
	mController.postShare(getActivity(), media, 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,代码行数:22,代码来源:BaseDetailFragment.java

示例6: addQQQZonePlatform

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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

示例7: initPlatforms

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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

示例8: addQQQZonePlatform

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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

示例9: addQQQZonePlatform

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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

示例10: completeUmeng

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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

示例11: addQQQZonePlatform

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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

示例12: onCreate

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的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: onShareItemSelected

import com.umeng.socialize.sso.UMQQSsoHandler; //导入依赖的package包/类
public void onShareItemSelected() {
    final UMSocialService socialService = UMServiceFactory.getUMSocialService("com.umeng.share");
    // Remove Tencent Weibo and QZone from share panel.
    socialService.getConfig().removePlatform(SHARE_MEDIA.TENCENT);
    socialService.getConfig().removePlatform(SHARE_MEDIA.QZONE);

    String webLink = this.topicInfo.getLinks().getWebURL();
    String shareContent = this.topicInfo.getTitle() + " " + webLink;
    String title = getString(R.string.share_topic, this.topicInfo.getUser().getData().getName());

    socialService.setShareContent(shareContent);

    if (!BuildConfig.QQ_APPID.isEmpty() && !BuildConfig.QQ_APPKEY.isEmpty()) {
        // Add QQ
        UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(this, BuildConfig.QQ_APPID, BuildConfig.QQ_APPKEY);
        qqSsoHandler.addToSocialSDK();

        QQShareContent qqShareContent = new QQShareContent();
        qqShareContent.setShareContent(shareContent);
        qqShareContent.setTitle(title);
        qqShareContent.setTargetUrl(this.topicInfo.getLinks().getWebURL());

        socialService.setShareMedia(qqShareContent);
    } else {
        socialService.getConfig().removePlatform(SHARE_MEDIA.QQ);
    }

    if (!BuildConfig.WX_APPID.isEmpty() && !BuildConfig.WX_SECRET.isEmpty()) {
        // Add WeiChat
        UMWXHandler wxHandler = new UMWXHandler(this, BuildConfig.WX_APPID, BuildConfig.WX_SECRET);
        wxHandler.addToSocialSDK();

        // Add WeChat Circle
        UMWXHandler wxCircleHandler = new UMWXHandler(this, BuildConfig.WX_APPID, BuildConfig.WX_SECRET);
        wxCircleHandler.setToCircle(true);
        wxCircleHandler.addToSocialSDK();

        //设置微信分享内容
        WeiXinShareContent weixinContent = new WeiXinShareContent();
        weixinContent.setShareContent(shareContent);
        weixinContent.setTitle(title);
        weixinContent.setTargetUrl(this.topicInfo.getLinks().getWebURL());
        weixinContent.setShareImage(new UMImage(this, topicInfo.getUser().getData().getAvatar()));
        socialService.setShareMedia(weixinContent);

        Logger.d(topicInfo.getUser().getData().getAvatar());
        //设置微信朋友圈分享内容
        CircleShareContent circleMedia = new CircleShareContent();
        circleMedia.setShareContent(shareContent);
        circleMedia.setTitle(title);
        circleMedia.setTargetUrl(this.topicInfo.getLinks().getWebURL());
        circleMedia.setShareImage(new UMImage(this, topicInfo.getUser().getData().getAvatar()));
        socialService.setShareMedia(circleMedia);
    }else{
        socialService.getConfig().removePlatform(SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE);
    }

    socialService.openShare(this, false);
}
 
开发者ID:CycloneAxe,项目名称:phphub-android,代码行数:60,代码来源:TopicDetailsActivity.java

示例14: initShare

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