本文整理汇总了Java中com.umeng.socialize.sso.QZoneSsoHandler.addToSocialSDK方法的典型用法代码示例。如果您正苦于以下问题:Java QZoneSsoHandler.addToSocialSDK方法的具体用法?Java QZoneSsoHandler.addToSocialSDK怎么用?Java QZoneSsoHandler.addToSocialSDK使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.umeng.socialize.sso.QZoneSsoHandler
的用法示例。
在下文中一共展示了QZoneSsoHandler.addToSocialSDK方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: 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);
}
示例4: 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();
}
示例5: 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();
}
示例6: 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();
}
示例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() {
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();
}
示例8: 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);
}
});
}
示例9: 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);
}
});
}
示例10: 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);
}
});
}
示例11: 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);
}
示例12: 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);
}