调用腾讯新闻分享功能(代码片段)

wangrong-smile wangrong-smile     2023-05-03     689

关键词:

示例:

技术图片

技术图片

技术图片

script

//  分享
    goGoodsShare() 
      // 1.打开分享窗口
      if (window.TencentNews && window.TencentNews.showActionMenu) 
          window.TencentNews.showActionMenu();
       else 
          alert("没有注册接口!");
      
      
      // 2.自定义分享信息接口
      // 接口:setShareArticleInfo(String shareTitle, String longTitle, String shareContent,
      // String shareUrl, String shareImgUrl)
      // 参数:
      // String shareTitle 分享标题
      // String longTitle 不支持 content 分享的长标题
      // String shareContent 分享的描述内容
      // String url 分享的 url
      // String imgUrl 分享的图片 url
      if (window.TencentNews && window.TencentNews.setShareArticleInfo) 
          window.TencentNews.setShareArticleInfo('分享测试标题-wangrong', '分享测试标题-wangrong',
                  '分享测试内容——say hello3', 'https://uatprizejiangbei.92jiangbei.com/#/dashboard',
                  'http://mat1.gtimg.com/www/newsapp/img/android/default_list_logo.png');
       else 
          alert("没有注册接口!");
      
    

相关文档:

1.腾讯新闻客户端JS API(IOS) https://sh.qq.com/zhuanti/wxpage/handbook.htm#EnableSingleH5Share

2.tencent-share https://npm.taobao.org/package/tencent-share

腾讯分享相关api

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>JsApi接口测试页面_腾讯新闻</title>
    <script>
        var test_ready_event_getCurrentLocationInfo = function () 
            if (window.TencentNews && window.TencentNews.getCurrentLocationInfo) 
                window.TencentNews.getCurrentLocationInfo(
                    onCallback: function (res) 
                        window.TencentNews.showWarningTips("injectionComplete:" + window.TencentNews.injectionComplete + JSON.stringify(res));
                    
                );
             else 
                alert("没有注册接口!");
            
            window.TencentNews.setTagSecondTitle("title":"英超 排名19");
        
        window.TencentNewsJsReady = test_ready_event_getCurrentLocationInfo;
        window.TencentNewsMsgReceiver = function(jsonStr) 
           window.TencentNews.writeLog("WebViewCommunicator_", "received msg: " + JSON.stringify(jsonStr));
           window.TencentNews.showWarningTips("regReceiver:" + JSON.stringify(jsonStr));
        
    </script>
    <!-- <script type="text/javascript" src="./js/resourceNews.js"></script> -->
    <script type="text/javascript" src="http://mat1.gtimg.com/www/js/newsapp/jsapi/news.js?_tsid=1"></script>
</head>
<body>
<style>
    .button-div 
        margin-top: 15px;
        margin-left: 15px;
        height: 30px;
        line-height: 30px;
        display: block;
        font-size: 16px;
        background-color: aliceblue;
    
</style>
<a href="./test_js_api_1.html">gotoTest1</a>
<img src="./images/audio_play.gif">

<div class="button-div" onclick="test_isMethodSupport()">
    test_isMethodSupport()
</div>

<div class="button-div" onclick="test_share()">
    test_share()
</div>

<div class="button-div" onclick="test_webview_bug()">
    test_webview_bug()
</div>


<div class="button-div" onclick="test_regReceiver()">
    test_regReceiver()
</div>
<div class="button-div" onclick="test_broadcastMsg()">
    test_broadcastMsg()
</div>
<div class="button-div" onclick="test_openNewWebView()">
    test_openNewWebView()测试不同webview广播与接受
</div>

<div class="button-div" onclick="test_notifyAppMsg()">
    test_notifyAppMsg() webview给App发消息
</div>

<div class="button-div" onclick="test_getConfigInfo()">
    test_getConfigInfo() 获取客户端参数配置或本地数据
</div>

<div class="button-div" onclick="test_sendBoss()">
    test_sendBoss
</div>
<div class="button-div" onclick="test_jumpToChannelWithFloat()">
    test_jumpToChannelWithFloat
</div>
<div class="button-div" onclick="test_jumpToChannelWithFloatTest()">
    test_jumpToChannelWithFloatTest
</div>
<div class="button-div" onclick="test_setTagSecondTitle_1()">
    test_setTagSecondTitle_1
</div>
<div class="button-div" onclick="test_setTagSecondTitle_2()">
    test_setTagSecondTitle_2
</div>
<div class="button-div" onclick="test_setReturnBtnActionType_1()">
    test_setReturnBtnActionType_1
</div>
<div class="button-div" onclick="test_setReturnBtnActionType_0()">
    test_setReturnBtnActionType_0
</div>
<div class="button-div" onclick="test_getAppInfo()">
    test_getAppInfo
</div>
<div class="button-div" onclick="test_getAppInfo()">
    test_getAppInfo
</div>
<div class="button-div" onclick="test_getNetworkStatus()">
    test_getNetworkStatus
</div>
<div class="button-div" onclick="test_getImei()">
    test_getImei
</div>
<div class="button-div" onclick="test_getUid()">
    test_getUid
</div>
<div class="button-div" onclick="test_getGestureQuit()">
    test_getGestureQuit
</div>
<div class="button-div" onclick="test_setGestureQuit_1()">
    test_setGestureQuit(true) 禁用右滑退出
</div>
<div class="button-div" onclick="test_setGestureQuit_2()">
    test_setGestureQuit(false) 开启右滑退出
</div>
<div class="button-div" onclick="test_enableShowBigImg()">
    test_enableShowBigImg(openBigImage需打开)
</div>
<div class="button-div" onclick="test_showWarningTips()">
    test_showWarningTips
</div>
<div class="button-div" onclick="test_showSuccessTips()">
    test_showSuccessTips
</div>
<div class="button-div" onclick="test_showErrorTips()">
    test_showErrorTips
</div>
<div class="button-div" onclick="test_showTextTips()">
    test_showTextTips
</div>
<div class="button-div" onclick="test_showAlert()">
    test_showAlert
</div>
<div class="button-div" onclick="test_showActionMenu()">
    test_showActionMenu
</div>
<div class="button-div" onclick="test_setShareArticleInfo()">
    test_setShareArticleInfo
</div>
<div class="button-div" onclick="test_deleteShareItems()">
    test_deleteShareItems
</div>
<div class="button-div" onclick="test_changeMainAccount()">
    test_changeMainAccount(qqorweixin)
</div>
<div class="button-div" onclick="test_showNativeLoginWithType_1()">
    test_showNativeLoginWithType(qq&wx)
</div>
<div class="button-div" onclick="test_showNativeLoginWithType_2()">
    test_showNativeLoginWithType(qq)
</div>
<div class="button-div" onclick="test_showNativeLoginWithType_3()">
    test_showNativeLoginWithType(weixin)
</div>
<div class="button-div" onclick="test_showNativeLoginWithType_4()">
    test_showNativeLoginWithType(qqconnect)
</div>
<div class="button-div" onclick="test_showNativeLoginWithType_5()">
    test_showNativeLoginWithType(qqconnectorweixin)
</div>
<div class="button-div" onclick="test_isQQLogin()">
    test_isQQLogin
</div>
<div class="button-div" onclick="test_isWeixinLogin()">
    test_isWeixinLogin
</div>
<div class="button-div" onclick="test_setUserData()">
    test_setUserData
</div>
<div class="button-div" onclick="test_getUserData()">
    test_getUserData
</div>
<div class="button-div" onclick="test_clearUserData()">
    test_clearUserData
</div>
<div class="button-div" onclick="test_getMainAccount()">
    test_getMainAccount
</div>
<div class="button-div" onclick="test_isAvailable()">
    test_isAvailable
</div>
<div class="button-div" onclick="test_setTitle()">
    test_setTitle
</div>
<div class="button-div" onclick="test_showNews()">
    test_showNews
</div>
<div class="button-div" onclick="test_openApp()">
    test_openApp
</div>
<div class="button-div" onclick="test_openNativeUrl_1()">
    test_openNativeUrl 打开QQ
</div>
<div class="button-div" onclick="test_openNativeUrl_2()">
    test_openNativeUrl 调起浏览器下载应用
</div>
<div class="button-div" onclick="test_openWebViewWithType()">
    test_openWebViewWithType
</div>
<div class="button-div" onclick="test_sendPayRequest()">
    test_sendPayRequest
</div>
<div class="button-div" onclick="test_getAppVersionName()">
    test_getAppVersionName
</div>
<div class="button-div" onclick="test_checkCanOpenNativeUrl()">
    test_checkCanOpenNativeUrl 安装QQ了?
</div>
<div class="button-div" onclick="test_downloadApp()">
    test_downloadApp
</div>
<div class="button-div" onclick="test_downloadAppByLocal()">
    test_downloadAppByLocal
</div>
<div class="button-div" onclick="test_downloadAppFromBrowser()">
    test_downloadAppFromBrowser
</div>
<div class="button-div" onclick="test_getCurrentLocationInfo()">
    test_getCurrentLocationInfo
</div>
<div class="button-div" onclick="test_getCurrentSubChannelCityInfo()">
    test_getCurrentSubChannelCityInfo
</div>
<div class="button-div" onclick="test_copy()">
    test_copy
</div>

<div class="button-div" onclick="test_zoomImageSrc()">
    test_zoomImageSrc
</div>
<div class="button-div" onclick="test_playVideo()">
    test_playVideo
</div>
<div class="button-div" onclick="test_getWeixinUserInfo()">
    test_getWeixinUserInfo(callback)
</div>
<div class="button-div" onclick="test_syncRedpacketUpdateInfo()">
    test_syncRedpacketUpdateInfo(callback)
</div>
<div class="button-div" onclick="test_getUserInfo()">
    test_getUserInfo(callback)
</div>
<div class="button-div" onclick="test_setSyncStatus_1()">
    test_setSyncStatus(true) 同步成功
</div>
<div class="button-div" onclick="test_setSyncStatus_2()">
    test_setSyncStatus(false) 同步失败
</div>
<div class="button-div" onclick="test_getAllInstalledApp()">
    test_getAllInstalledApp(callback)
</div>
<div class="button-div" onclick="test_isAppInstalled('com.tencent.mobileqq')">
    test_isAppInstalled("com.tencent.mobileqq")
</div>
<div class="button-div" onclick="test_isAppInstalled('com.taobao.taobao')">
    test_isAppInstalled("com.taobao.taobao")
</div>
<div class="button-div" onclick="test_setActionBtn_0()">
    test_setActionBtn("0")
</div>
<div class="button-div" onclick="test_setActionBtn_1()">
    test_setActionBtn("1")
</div>
<div class="button-div" onclick="test_setActionBtn_2()">
    test_setActionBtn("2")
</div>
<div class="button-div" onclick="test_saveImageToLocal()">
    test_saveImageToLocal("url","imgType")
</div>
<div class="button-div" onclick="test_checkAppStatus()">
    test_checkAppStatus(apkInfo, callback)
</div>
<div class="button-div" onclick="test_downloadApp_gdt()">
    test_downloadApp_gdt(apkInfo, callback)
</div>
<div class="button-div" onclick="test_installApp()">
    test_installApp(apkInfo, callback)
</div>
<div class="button-div" onclick="test_launchApp()">
    test_launchApp(apkInfo)
</div>
<div class="button-div">
    广告下载回调结果:<span id="callback">status, progress</span>
</div>
<div class="button-div" onclick="test_syncSignPointUpdateInfo()">
    test_syncSignPointUpdateInfo(1) 签到积分
</div>
<div class="button-div" onclick="test_loginOut()">
    test_loginOut()
</div>
<div class="button-div" onclick="test_loginOut_callBack()">
    test_loginOut_callBack()
</div>


<div class="button-div" onclick="test_buyDiamond()">
    test_buyDiamond() 购买钻石
</div>
<div class="button-div" onclick="test_previewDetailImage()">
    test_previewDetailImage
</div>
<div class="button-div" onclick="test_setBottomBarVisibility_true()">
    test_setBottomBarVisibility(true)
</div>
<div class="button-div" onclick="test_setBottomBarVisibility_false()">
    test_setBottomBarVisibility(false)
</div>
<div class="button-div" onclick="test_getAdInfo()">
    test_getAdInfo()
</div>
<div class="button-div" onclick="test_appUsedSceonds()">
    test_appUsedSceonds()
</div>
<div class="button-div" onclick="test_pluginRequest()">
    test_pluginRequest()
</div>
<div class="button-div" onclick="test_openReadingPage()">
    test_openReadingPage()
</div>
<div class="button-div" onclick="test_openBookShelfPage()">
    test_openBookShelfPage()
</div>
<div class="button-div" onclick="test_openClassifyPage()">
    test_openClassifyPage()
</div>

<div class="button-div" onclick="test_openWebViewPage()">
    test_openWebViewPage()
</div>

<div class="button-div" onclick="test_adVideoBeginPlay()">
    test_adVideoBeginPlay()
</div>

<div class="button-div" onclick="test_refreshWxAccessToken()">
    test_refreshWxAccessToken()
</div>

<div class="button-div" onclick="test_gotoPushHistoryPage()">
    test_gotoPushHistoryPage()
</div>

<div class="button-div" onclick="test_getSecurityRequestCheckCode()">
    test_getSecurityRequestCheckCode()
</div>
<div class="button-div" onclick="test_writeLog()">
    test_writeLog()
</div>
<div class="button-div" onclick="test_pluginInvoke()">
    test_pluginInvoke()
</div>

<div class="button-div" onclick="test_adjustWebViewInfo()">
    test_adjustWebViewInfo()
</div>

<div class="button-div" onclick="test_isAllPushClose()">
    test_isAllPushClose()
</div>

<div class="button-div" onclick="test_isNotificationEnabled()">
    test_isNotificationEnabled()
</div>

<div class="button-div" onclick="test_gotoPushSwitchSettingPage()">
    test_gotoPushSwitchSettingPage()
</div>

<div class="button-div" onclick="test_enableLocalPush()">
    test_enableLocalPush()
</div>

<div class="button-div" onclick="test_showBigImageShareMenu()">
    test_showBigImageShareMenu()
</div>

<div class="button-div" onclick="test_removeWebView()">
    test_removeWebView()
</div>

<div class="button-div" onclick="test_changeTitleColorBlack()">
    test_changeTitleColorBlack()
</div>

<div class="button-div" onclick="test_changeTitleColorWhite()">
    test_changeTitleColorWhite()
</div>

<div class="button-div" onclick="test_closeWebview()">
    test_closeWebview()
</div>

<a href="https://view.inews.qq.com/a/TWF201812280026861P?uid=&chlid=news_news_top">h5ToNative专题文章</a>
<a href="https://view.inews.qq.com/a/20181223A0T8FS00?uid=">h5ToNative图文文章</a>
<a href="https://view.inews.qq.com/a/20180829V1TNXI00?uid=&cur_vid=s0770adlxac">h5ToNative视频文章</a>
<script type="text/javascript">
    var alertInfo = function (res) 
        alert(res)
    ;

    var test_regReceiver = function () 
        if (window.TencentNews && window.TencentNews.regReceiver) 
             var jsonObject = 
                 onCallback:function (ret) 
                    alert('"监听注册成功,可在当前webview或新打开webview发送广播了"')
                
             ;
             window.TencentNews.regReceiver(jsonObject);
         else 
             alert(' 没有注册接口!')
        
    
    var broadcastMsg = "content":"broadcast msg";
    <!--var broadcastMsg = "content":"broad_key":"broad_value"-->
    var test_broadcastMsg = function () 
        if (window.TencentNews && window.TencentNews.broadcastMsg) 
            alert('广播成功,可在注册的webview中接受到改事件')
            window.TencentNews.broadcastMsg(broadcastMsg);
         else 
            alert(' 没有注册接口!')
        
    

    var notifyAppMsg = 
                         "content": 
                            "sign_success":"1",
                            "force_point_strong_tip":"1"
                          
                       ;
    var test_notifyAppMsg = function () 
        if (window.TencentNews && window.TencentNews.notifyAppMsg) 
             window.TencentNews.notifyAppMsg(notifyAppMsg);
             alert('通知成功:'+ JSON.stringify(notifyAppMsg))
         else 
            alert(' 没有注册接口!')
        
    

    var test_getConfigInfo = function () 
        if (window.TencentNews && window.TencentNews.getConfigInfo) 
             window.TencentNews.getConfigInfo("newUserTaskReadCount");
         else 
            alert(' 没有注册接口!')
        
    

    var test_jumpToChannelWithFloat = function () 
        var jsonObject = 
            "onCallback": "",
            "channelId": "news_news_sports",
            "floatInfo": 
                "iconUrl": "http://inews.gtimg.com/newsapp_bt/0/2734515840/641",
                "iconDesc": "获得超级勋章",
                "title": "体育领域冠军",
                "description": "体育领域达到500分",
                "buttonText": "返回智者荣耀",
                "openUrl": "file:///android_asset/test_js_api.html"
            
        ;

        if (window.TencentNews && window.TencentNews.jumpToChannelWithFloat) 
            //window.TencentNews.jumpToChannelWithFloat('','news_news_sports',JSON.stringify(jsonObject));
            window.TencentNews.jumpToChannelWithFloat(jsonObject);
         else 
            alert("没有注册接口!");
        
    

    var test_showBigImageShareMenu = function () 
        var jsonObject = 
             "url": "https://file.service.qq.com/user-files/uploads/201903/4f05bb2b9d557ec64d45d65847098607.jpg",
             "onCallback": function (res) 
                alert(JSON.stringify(res))
             
        ;

        if (window.TencentNews && window.TencentNews.showBigImageShareMenu) 
            window.TencentNews.showBigImageShareMenu(jsonObject);
         else 
            alert("没有注册接口!");
        
    

    var test_removeWebView = function () 
        if (window.TencentNews && window.TencentNews.removeWebView) 
            window.TencentNews.removeWebView();
         else 
            alert("没有注册接口!");
        
    

    var test_jumpToChannelWithFloatTest = function () 
        var jsonObject = 
            "iconUrl": "http://inews.gtimg.com/newsapp_ls/0/214174d957805441135aef21fd29c564/0",
            "iconDesc": "获得超级勋章",
            "description": "体育领域达到500分",
            "buttonText": "点击返回",
            "openUrl": "file:///android_asset/test_js_api.html"
        ;

        if (window.TencentNews && window.TencentNews.jumpToChannelWithFloat) 
            window.TencentNews.jumpToChannelWithFloat('alertInfo','news_news_sports',JSON.stringify(jsonObject));
         else 
            alert("没有注册接口!");
        
    
    var test_getAppInfo = function () 
        if (window.TencentNews && window.TencentNews.getAppInfo) 
            window.TencentNews.getAppInfo('alertInfo');
         else 
            alert("没有注册接口!");
        
    

    var test_getNetworkStatus = function () 
        if (window.TencentNews && window.TencentNews.getNetworkStatus) 
            window["getNetworkStatusCallBack"] = function (re) 
                alert("当前网络状态:" + re);
            ;
            window.TencentNews.getNetworkStatus("getNetworkStatusCallBack");
         else 
            alert("没有注册接口!");
        
    

    var test_getImei = function () 
        if (window.TencentNews && window.TencentNews.getImei) 
            window.TencentNews.getImei('alertInfo');
         else 
            alert("没有注册接口!");
        
    

    var test_getUid = function () 
        if (window.TencentNews && window.TencentNews.getUid) 
            window.TencentNews.getUid('alertInfo');
         else 
            alert("没有注册接口!");
        
    

    var test_getGestureQuit = function () 
        if (window.TencentNews && window.TencentNews.getGestureQuit) 
            window["getGestureQuitNameCallBack"] = function (re) 
                alert(re);
            ;
            window.TencentNews.getGestureQuit("getGestureQuitNameCallBack");
         else 
            alert("没有注册接口!");
        
    

    var test_setGestureQuit_1 = function () 
        if (window.TencentNews && window.TencentNews.setGestureQuit) 
            window.TencentNews.setGestureQuit(true);
         else 
            alert("没有注册接口!");
        
    

    var test_setGestureQuit_2 = function () 
        if (window.TencentNews && window.TencentNews.setGestureQuit) 
            window.TencentNews.setGestureQuit(false);
         else 
            alert("没有注册接口!");
        
    

    var test_enableShowBigImg = function () 
        if (window.TencentNews && window.TencentNews.enableShowBigImg) 
            window.TencentNews.enableShowBigImg(1);
         else 
            alert("没有注册接口!");
        
    

    var test_showWarningTips = function () 
        if (window.TencentNews && window.TencentNews.showWarningTips) 
            window.TencentNews.showWarningTips("警告你不要乱搞啊!!!");
         else 
            alert("没有注册接口!");
        
    

    var test_showSuccessTips = function () 
        if (window.TencentNews && window.TencentNews.showSuccessTips) 
            window.TencentNews.showSuccessTips("操作成功!");
         else 
            alert("没有注册接口!");
        
    
    var test_showErrorTips = function () 
        if (window.TencentNews && window.TencentNews.showErrorTips) 
            window.TencentNews.showErrorTips("哎哟,崩溃了!");
         else 
            alert("没有注册接口!");
        
    
    var test_showTextTips = function () 
        if (window.TencentNews && window.TencentNews.showTextTips) 
            window.TencentNews.showTextTips("next tips");
         else 
            alert("没有注册接口!");
        
    
    var test_showAlert = function () 
        if (window.TencentNews && window.TencentNews.showAlert) 
            var alertInfo = function (res) 
                alert("你点击了[" + res + "]按钮")
            ;
            window.TencentNews.showAlert('0', '测试对话框', '测试一下', '["确定","取消""]', 'alertInfo', '');
         else 
            alert("没有注册接口!");
        
    
    var test_showActionMenu = function () 
        if (window.TencentNews && window.TencentNews.showActionMenu) 
            window.TencentNews.showActionMenu();
         else 
            alert("没有注册接口!");
        
    
    var test_setShareArticleInfo = function () 
        if (window.TencentNews && window.TencentNews.setShareArticleInfo) 
            window.TencentNews.setShareArticleInfo('分享测试标题', '分享测试长标题',
                    '分享测试内容', 'http://www.qq.com',
                    'http://mat1.gtimg.com/www/newsapp/img/android/default_list_logo.png');
         else 
            alert("没有注册接口!");
        
    
    var test_deleteShareItems = function () 
        if (window.TencentNews && window.TencentNews.deleteShareItems) 
            window.TencentNews.deleteShareItems("0,1,2");
         else 
            alert("没有注册接口!");
        
    

    var test_changeMainAccount = function () 
        //登录后的回调函数
        window["changeMainAccountCallBack"] = function (status, params) 
            if (status == 1) 
                alert("切换成功:" + params);
            
            if (status == 0) 
                alert("切换失败:" + params);
            
        ;
        if (window.TencentNews && window.TencentNews.changeMainAccount) 
            window.TencentNews.changeMainAccount("changeMainAccountCallBack", "qqorweixin", "自定义参数");
         else 
            alert("没有注册接口!");
        
    

    var test_showNativeLoginWithType_1 = function () 
        //登录后的回调函数
        window["showNativeLoginWithTypeCallBack"] = function (status, params) 
            if (status == 1) 
                alert("登录成功:" + params);
            
            if (status == 0) 
                alert("登录失败:" + params);
            
        ;
        //调起登录界面包含QQ和微信
        if (window.TencentNews && window.TencentNews.showNativeLoginWithType) 
            window.TencentNews.showNativeLoginWithType("qqorweixin", "showNativeLoginWithTypeCallBack", "自定义参数");
         else 
            alert("没有注册接口!");
        
    

    var test_showNativeLoginWithType_2 = function () 
        //登录后的回调函数
        window["showNativeLoginWithTypeCallBack"] = function (status, params) 
            if (status == 1) 
                alert("登录成功:" + params);
            
            if (status == 0) 
                alert("登录失败:" + params);
            
        ;
        //调起登录界面只包含QQ
        if (window.TencentNews && window.TencentNews.showNativeLoginWithType) 
            window.TencentNews.showNativeLoginWithType("qq", "showNativeLoginWithTypeCallBack", "自定义参数");
         else 
            alert("没有注册接口!");
        
    
    var test_showNativeLoginWithType_3 = function () 
        //登录后的回调函数
        window["showNativeLoginWithTypeCallBack"] = function (status, params) 
            if (status == 1) 
                alert("登录成功:" + params);
            
            if (status == 0) 
                alert("登录失败:" + params);
            
        ;
        //调起登录界面只包含QQ
        if (window.TencentNews && window.TencentNews.showNativeLoginWithType) 
            window.TencentNews.showNativeLoginWithType("weixin", "showNativeLoginWithTypeCallBack", "自定义参数");
         else 
            alert("没有注册接口!");
        
    

    var test_showNativeLoginWithType_4 = function () 
        //登录后的回调函数
        window["showNativeLoginWithTypeCallBack"] = function (status, params) 
            if (status == 1) 
                alert("登录成功:" + params);
            
            if (status == 0) 
                alert("登录失败:" + params);
            
        ;
        //调起登录界面包含QQ和微信
        if (window.TencentNews && window.TencentNews.showNativeLoginWithType) 
            window.TencentNews.showNativeLoginWithType("qqconnect", "showNativeLoginWithTypeCallBack", "自定义参数");
         else 
            alert("没有注册接口!");
        
    

        var test_showNativeLoginWithType_5 = function () 
        //登录后的回调函数
        window["showNativeLoginWithTypeCallBack"] = function (status, params) 
            if (status == 1) 
                alert("登录成功:" + params);
            
            if (status == 0) 
                alert("登录失败:" + params);
            
        ;
        //调起登录界面包含QQ和微信
        if (window.TencentNews && window.TencentNews.showNativeLoginWithType) 
            window.TencentNews.showNativeLoginWithType("qqconnectorweixin", "showNativeLoginWithTypeCallBack", "自定义参数");
         else 
            alert("没有注册接口!");
        
    

    var test_isQQLogin = function () 
        window["isQQLoginCallBack"] = function (re) 
            alert(re);
        ;

        if (window.TencentNews && window.TencentNews.isQQLogin) 
            window.TencentNews.isQQLogin("isQQLoginCallBack");
         else 
            alert("没有注册接口!");
        
    
    var test_isWeixinLogin = function () 
        window["isWeixinLoginCallBack"] = function (re) 
            alert(re);
        ;

        if (window.TencentNews && window.TencentNews.isWeixinLogin) 
            window.TencentNews.isWeixinLogin("isWeixinLoginCallBack");
         else 
            alert("没有注册接口!");
        
    
    var test_setUserData = function () 
        if (window.TencentNews && window.TencentNews.setUserData) 
            window.TencentNews.setUserData('testKey', 'testValue');
         else 
            alert("没有注册接口!");
        
    
    var test_getUserData = function () 
        if (window.TencentNews && window.TencentNews.getUserData) 
            window.TencentNews.getUserData('testKey', 'alert');
         else 
            alert("没有注册接口!");
        
    
    var test_clearUserData = function () 
        if (window.TencentNews && window.TencentNews.clearUserData) 
            window.TencentNews.clearUserData('testKey');
         else 
            alert("没有注册接口!");
        
    
    var test_getMainAccount = function () 
        if (window.TencentNews && window.TencentNews.getMainAccount) 
            window.TencentNews.getMainAccount('alert');
         else 
            alert("没有注册接口!");
        
    
    var test_isAvailable = function () 
        if (window.TencentNews && window.TencentNews.isAvailable) 
            window.TencentNews.isAvailable('alert');
         else 
            alert("没有注册接口!");
        
    
    var test_setTitle = function () 
        if (window.TencentNews && window.TencentNews.setTitle) 
            window.TencentNews.setTitle("修改腾讯新闻标题");
         else 
            alert("没有注册接口!");
        
    
    var test_showNews = function () 
        if (window.TencentNews && window.TencentNews.showNews) 
            window.TencentNews.showNews('NEW2015061204090900', '');
         else 
            alert("没有注册接口!");
        
    
    var test_openApp = function () 
        if (window.TencentNews && window.TencentNews.openApp) 
            window.TencentNews.openApp("", "com.tencent.mobileqq");
         else 
            alert("没有注册接口!");
        
    

    var test_openNativeUrl_1 = function () 
        if (window.TencentNews && window.TencentNews.openNativeUrl) 
            window.TencentNews.openNativeUrl("com.tencent.mobileqq");
         else 
            alert("没有注册接口!");
        
    

    var test_openNativeUrl_2 = function () 
        if (window.TencentNews && window.TencentNews.openNativeUrl) 
            window.TencentNews.openNativeUrl("http://gdown.baidu.com/data/wisegame/15ac2322108492ab/tengxunxinwen_432.apk");
         else 
            alert("没有注册接口!");
        
    
    var test_openWebViewWithType = function () 
        if (window.TencentNews && window.TencentNews.openWebViewWithType) 
            window.TencentNews.openWebViewWithType('http://www.qq.com', '1');
         else 
            alert("没有注册接口!");
        
    

    var test_openNewWebView = function () 
        if (window.TencentNews && window.TencentNews.openWebViewWithType) 
            window.TencentNews.openWebViewWithType('file:///android_asset/test_js_api.html', '1');
         else 
            alert("没有注册接口!");
        
    

    var test_sendPayRequest = function () 
        window["sendPayRequesteCallBack"] = function (Json) 
            alert("支付后:" + Json);
        ;
        var jsonObject = 
            "qnbid": "10001",
            "appid": "wx073f4a4daff0abe8",
            "partnerid": "1217628601",
            "prepayid": "11010000001408054f82907e84946a52",
            "noncestr": "a8849b052492b5106526b2331e526138",
            "timestamp": "1407233000",
            "package": "Sign=Wxpay",
            "sign": "d35ec7242bac16907fcbf52c630e077fdfb3ceb9"
        ;

        if (window.TencentNews && window.TencentNews.sendPayRequest) 
            window.TencentNews.sendPayRequest(JSON.stringify(jsonObject), "sendPayRequesteCallBack");
         else 
            alert("没有注册接口!");
        
    
    var test_getAppVersionName = function () 
        window["getAppVersionNameCallBack"] = function (re) 
            alert(re);
        ;

        if (window.TencentNews && window.TencentNews.getAppVersionName) 
            window.TencentNews.getAppVersionName("com.tencent.mobileqq", "getAppVersionNameCallBack");
         else 
            alert("没有注册接口!");
        
    
    var test_checkCanOpenNativeUrl = function () 
        window["checkCanOpenNativeUrlCallBack"] = function (re) 
            alert(re);
        ;

        if (window.TencentNews && window.TencentNews.checkCanOpenNativeUrl) 
            window.TencentNews.checkCanOpenNativeUrl("com.tencent.mobileqq", "checkCanOpenNativeUrlCallBack");
         else 
            alert("没有注册接口!");
        
    
    var test_downloadApp = function () 
        if (window.TencentNews && window.TencentNews.downloadApp) 
            window.TencentNews.downloadApp("http://gdown.baidu.com/data/wisegame/15ac2322108492ab/tengxunxinwen_432.apk", 'com.tencent.news', '腾讯新闻');
         else 
            alert("没有注册接口!");
        
    
    var test_downloadAppByLocal = function () 
        if (window.TencentNews && window.TencentNews.downloadAppByLocal) 
            window.TencentNews.downloadAppByLocal('999925258',
                                        'http://dlied5.myapp.com/myapp/1105562722/hlxq/10002369_com.tencent.tmgp.hlxq_a121_1.2.31.0.apk',
                                        'com.tencent.tmgp.hlxq',
                                        '欢乐球吃球',
                                        '1.2.31.0',
                                        "透传字段"
                                        );
         else 
            alert("没有注册接口!");
        
    
    var test_downloadAppFromBrowser = function () 
        if (window.TencentNews && window.TencentNews.downloadAppFromBrowser) 
            window.TencentNews.downloadAppFromBrowser("http://gdown.baidu.com/data/wisegame/15ac2322108492ab/tengxunxinwen_432.apk");
         else 
            alert("没有注册接口!");
        
    
    var test_getCurrentLocationInfo = function () 
        if (window.TencentNews && window.TencentNews.getCurrentLocationInfo) 
            window.TencentNews.getCurrentLocationInfo(
                onCallback: function (res) 
                    alert(JSON.stringify(res))
                
            );
         else 
            alert("没有注册接口!");
        
    
    var test_getCurrentSubChannelCityInfo = function () 
        if (window.TencentNews && window.TencentNews.getCurrentSubChannelCityInfo) 
            window.TencentNews.getCurrentSubChannelCityInfo(
                channelID: "news_news_auto",
                onCallback: function (res) 
                    alert(JSON.stringify(res))
                
            );
         else 
            alert("没有注册接口!");
        
    
    var test_copy = function () 
        if (window.TencentNews && window.TencentNews.copy) 
            window.TencentNews.copy("test");
         else 
            alert("没有注册接口!");
        
    
    var bossJson = "eventID":"boss_report_cross_detail_up_scroll", "params":"currPage":"4";
    var test_sendBoss = function () 
        if (window.TencentNews && window.TencentNews.sendBoss) 
            window.TencentNews.sendBoss(bossJson);
         else 
            alert("没有注册接口!");
        
    
    var test_zoomImageSrc = function () 
        if (window.TencentNews && window.TencentNews.zoomImageSrc) 
            window.TencentNews.zoomImageSrc('http://mat1.gtimg.com/www/newsapp/img/android/default_list_logo.png');
         else 
            alert("没有注册接口!");
        
    
    var test_playVideo = function () 
        if (window.TencentNews && window.TencentNews.playVideo) 
            window.TencentNews.playVideo("http://player.youku.com/embed/XNzQxMjg1OTQw");
         else 
            alert("没有注册接口!");
        
    

    var test_setTagSecondTitle_1 = function () 
        if (window.TencentNews && window.TencentNews.setTagSecondTitle) 
            window.TencentNews.setTagSecondTitle("title":"英超 排名19");
         else 
            alert("没有注册接口!");
        
    

     var test_setTagSecondTitle_2 = function () 
        if (window.TencentNews && window.TencentNews.setTagSecondTitle) 
            window.TencentNews.setTagSecondTitle("title":"");
         else 
            alert("没有注册接口!");
        
    

    var test_setReturnBtnActionType_1 = function () 
        if (window.TencentNews && window.TencentNews.setReturnBtnActionType) 
            window.TencentNews.setReturnBtnActionType(1);
         else 
            alert("没有注册接口!");
        
    

    var test_setReturnBtnActionType_0 = function () 
        if (window.TencentNews && window.TencentNews.setReturnBtnActionType) 
            window.TencentNews.setReturnBtnActionType(0);
         else 
            alert("没有注册接口!");
        
    

    var test_getWeixinUserInfo = function () 
        if (window.TencentNews && window.TencentNews.getWeixinUserInfo) 
            window.TencentNews.getWeixinUserInfo('alertInfo');
         else 
            alert("没有注册接口!");
        
    

    var test_syncRedpacketUpdateInfo = function () 
        if (window.TencentNews && window.TencentNews.syncRedpacketUpdateInfo) 
            window.TencentNews.syncRedpacketUpdateInfo('1', '2');
         else 
            alert("没有注册接口!");
        
    

    var test_getUserInfo = function () 
        if (window.TencentNews && window.TencentNews.getUserInfo) 
            window.TencentNews.getUserInfo('alertInfo');
         else 
            alert("没有注册接口!");
        
    

    var test_setSyncStatus_1 = function () 
        if (window.TencentNews && window.TencentNews.setSyncStatus) 
            window.TencentNews.setSyncStatus(true);
            alert("同步成功")
         else 
            alert("没有注册接口!");
        
    

    var test_setSyncStatus_2 = function () 
        if (window.TencentNews && window.TencentNews.setSyncStatus) 
            window.TencentNews.setSyncStatus(false);
            alert("同步失败")
         else 
            alert("没有注册接口!");
        
    

    var test_getAllInstalledApp = function () 
        window["getAllInstalledAppCallBack"] = function (re) 
            alert(re);
        ;

        if (window.TencentNews && window.TencentNews.getAllInstalledApp) 
            window.TencentNews.getAllInstalledApp("getAllInstalledAppCallBack");
         else 
            alert("没有注册接口!");
        
    

    var test_isAppInstalled = function (pkgName) 
        if (window.TencentNews && window.TencentNews.isAppInstalled) 
            var ret = window.TencentNews.isAppInstalled(pkgName);
            alert("isInstalled:" + ret);
         else 
            alert("没有注册接口!");
        
    

    var test_setActionBtn_0 = function () 
        if (window.TencentNews && window.TencentNews.setActionBtn) 
            window.TencentNews.setActionBtn("0");
            alert("设置的0")
         else 
            alert("没有注册接口!");
        
    

    var test_setActionBtn_1 = function () 
        if (window.TencentNews && window.TencentNews.setActionBtn) 
            window.TencentNews.setActionBtn("1");
            alert("设置的1")
         else 
            alert("没有注册接口!");
        
    

    var test_setActionBtn_2 = function () 
        if (window.TencentNews && window.TencentNews.setActionBtn) 
            window.TencentNews.setActionBtn("2");
            alert("设置的2")
         else 
            alert("没有注册接口!");
        
    

    var test_saveImageToLocal = function () 
        if (window.TencentNews && window.TencentNews.saveImageToLocal) 
            window.TencentNews.saveImageToLocal("http://inews.gtimg.com/newsapp_match/0/574349072/0","gif");
         else 
            alert("没有注册接口!");
        
    

    var json = 
                "appId": "test123456",
                "apkUrl": "http://dd.myapp.com/16891/CAAE58B9F18A454A4F2F0D9BF3430921.apk?fsname=com.yuyuetech.yuyue_2.2.3_7.apk",
                "packageName": "com.yuyuetech.yuyue",
                "appName": "寓悦家居",
                "logoUrl": "http://pp.myapp.com/ma_icon/0/icon_12261780_1457414413/256",
                "actionCode": 1,
                "versionCode": 1,
                "md5": "d4f73a30b8a225e53c0d56e3e1167685"
            ;
    var test_checkAppStatus = function () 
        if (window.TencentNews && window.TencentNews.checkAppStatus) 
            window.TencentNews.checkAppStatus(JSON.stringify(json), "apkCallback");
         else 
            alert("没有注册接口!");
        
    

    var test_downloadApp_gdt = function () 
        if (window.TencentNews && window.TencentNews.downloadApp_gdt) 
            window.TencentNews.downloadApp_gdt(JSON.stringify(json), "apkCallback");
         else 
            alert("没有注册接口!");
        
    

    var test_installApp = function () 
        if (window.TencentNews && window.TencentNews.installApp) 
            window.TencentNews.installApp(JSON.stringify(json), "apkCallback");
         else 
            alert("没有注册接口!");
        
    

    var test_launchApp = function () 
        if (window.TencentNews && window.TencentNews.launchApp) 
            window.TencentNews.launchApp(JSON.stringify(json));
         else 
            alert("没有注册接口!");
        
    

    var apkCallback = function (status, progress) 
        document.getElementById("callback").innerHTML = "status = " + status + ", progress = " + progress;
    

        var test_syncSignPointUpdateInfo = function () 
        if (window.TencentNews && window.TencentNews.syncSignPointUpdateInfo) 
            window.TencentNews.syncSignPointUpdateInfo(1);
         else 
            alert("没有注册接口!");
        
    

    var test_loginOut = function () 
        if (window.TencentNews && window.TencentNews.logoutMainAccount) 
            window.TencentNews.logoutMainAccount();
         else 
            alert("没有注册接口!");
        
    

    function logoutCallback(status) 
        console.log("logoutCallback status : "+status);
    
    var test_loginOut_callBack = function () 
        if (window.TencentNews && window.TencentNews.logoutMainAccount) 
            window.TencentNews.logoutMainAccount("logoutCallback");
         else 
            alert("没有注册接口!");
        
    
    function buyDiamondCallback(success) 
        console.log("buyDiamondCallback success:" + success);
    
    var test_buyDiamond = function () 
        if (window.TencentNews && window.TencentNews.buyDiamond) 
            console.log("buyDiamondCallback test_buyDiamond()");
            window.TencentNews.buyDiamond("title1", "subtitle1", "99", "buyDiamondCallback");
         else 
            alert("没有注册接口!");
        
    

    var imagesJson = 
        "imagelist": [
            
                "url": "http://inews.gtimg.com/newsapp_bt/0/2300973818/1000",
               "desc": "四川工程职业技术学院15级艺术系学前教育一班是个比较特殊的班级,他们班总共51人,其中50人都是女生,仅有1名男生。由于明年将毕业,近日他们拍摄了一组毕业照,这名男"
            ,
            
                "url": "http://inews.gtimg.com/newsapp_bt/0/2300973616/641",
                "desc": "班长杜泓颖介绍说,这组毕业照是由学院的“影璀摄影工作室”帮忙拍摄的。在列队组合时,作为班上的唯一例外,这名男生成为“班花”,享受特别优待,其他女生心甘情愿作为绿叶。"
            ,
          
             "url": "http://inews.gtimg.com/newsapp_bt/0/2300973914/1000",
               "desc": "男生名叫李先强,他性格活泼开朗,虽然平时显得有些“孤单”,但跟同学们相处很融洽。李先强说:“当初报考这个专业的时候,估计男生会比较少,但入学后才发现居然只有自己一个"
          ,
          
              "url": "http://inews.gtimg.com/newsapp_bt/0/2300973615/641",
               "desc": "四川工程职业技术学院15级艺术系学前教育一班是个比较特殊的班级,他们班总共51人,其中50人都是女生,仅有1名男生。由于明年将毕业,近日他们拍摄了一组毕业照,这名男生成为绝对的焦点:以他为中心,"
           ,
           
              "url": "http://inews.gtimg.com/newsapp_bt/0/2300973813/1000",
              "desc": "班长杜泓颖介绍说,这组毕业照是由学院的“影璀摄影工作室”帮忙拍摄的。在列队组合时,作为班上的唯一例外,这名男生成为“班花”,享受特别优待,其他女生心甘情愿作为绿叶。"
          ,
          
               "url": "http://inews.gtimg.com/newsapp_bt/0/2300973885/641",
                "desc": "男生名叫李先强,他性格活泼开朗,虽然平时显得有些“孤单”,但跟同学们相处很融洽。李先强说:“当初报考这个专业的时候,估计男生会比较少,但入学后才发现居然只有自己一个"
            
        ]
    ;
    var test_previewDetailImage = function () 
        if (window.TencentNews && window.TencentNews.previewDetailImage) 
            window.TencentNews.previewDetailImage(3,JSON.stringify(imagesJson));
         else 
            alert("没有注册接口!");
        
    

    var test_setBottomBarVisibility_true = function () 
        if (window.TencentNews && window.TencentNews.setBottomBarVisibility) 
            window.TencentNews.setBottomBarVisibility(true);
         else 
            alert("没有注册接口!");
        
    
    var test_setBottomBarVisibility_false = function () 
        if (window.TencentNews && window.TencentNews.setBottomBarVisibility) 
            window.TencentNews.setBottomBarVisibility(false);
         else 
            alert("没有注册接口!");
        
    

    var test_getAdInfo = function () 
        if (window.TencentNews && window.TencentNews.getAdInfo) 
            alert(window.TencentNews.getAdInfo());
         else 
            alert("没有注册接口!");
        
    
    var test_appUsedSceonds = function () 
        if (window.TencentNews && window.TencentNews.appUsedSceonds) 
            window.TencentNews.appUsedSceonds('alertInfo');
         else 
            alert("没有注册接口!");
        
    

    function pluginRequestCallBack(result)
        console.log("pluginRequestCallBack :" + result);
        window.TencentNews.showWarningTips("pluginRequestCallBack :" + result);
    
    var jsonParams = '"mid":"123456","isShow":true,"double":12.345';
    var test_pluginRequest = function () 
        if (window.TencentNews && window.TencentNews.pluginRequest) 
            window.TencentNews.pluginRequest("com.tencent.news.main", "request_news_monetary",jsonParams,"pluginRequestCallBack");
         else 
            alert("没有注册接口!");
        
    

    var invokeJsonParams = '"sports_ext":"type":"20001","param":"columnId":"100000","searchKey":"NBA","title":"NBA","tab":"1"';
    var test_pluginInvoke = function () 
        if (window.TencentNews && window.TencentNews.pluginInvoke) 
            window.TencentNews.pluginInvoke("com.tencent.news.sports", "206",invokeJsonParams);
         else 
            alert("没有注册接口!");
        
    

    var test_adjustWebViewInfo = function () 
        if (window.TencentNews && window.TencentNews.adjustWebViewInfo) 
            var params = '"aspectRatio":1.2';
            window.TencentNews.adjustWebViewInfo(params);
            alert("调整宽高比:1.2");
         else 
            alert("没有注册接口!");
        
    

    var jsonReadingParams = '"STR_MSG_COMIC_BOOK_ID":"542861", "STR_MSG_COMIC_TITLE":"宅妖记"'
    var test_openReadingPage = function () 
        if (window.TencentNews && window.TencentNews.pluginRequest) 
             window.TencentNews.pluginRequest("com.tencent.news.comic", "open_reading_page", jsonReadingParams, "pluginRequestCallBack");
         else 
            alert(' 没有注册接口!')
        
    

    var test_openBookShelfPage = function () 
        if (window.TencentNews && window.TencentNews.pluginRequest) 
             window.TencentNews.pluginRequest("com.tencent.news.comic", "open_bookshelf_page", "", "pluginRequestCallBack");
         else 
            alert(' 没有注册接口!')
        
    


    var test_openClassifyPage = function () 
        if (window.TencentNews && window.TencentNews.pluginRequest) 
             window.TencentNews.pluginRequest("com.tencent.news.comic", "open_classify_page", "", "pluginRequestCallBack");
         else 
            alert(' 没有注册接口!')
        
    

    var jsonWebParams = '"WEBVIEW_H5_URL_FLAG":"file:///android_asset/test_js_api_1.html", "WEBVIEW_H5_TITLE_FLAG":"测试页面"'
    var test_openWebViewPage = function () 
        if (window.TencentNews && window.TencentNews.pluginRequest) 
             window.TencentNews.pluginRequest("com.tencent.news.comic", "open_webview_page", jsonWebParams, "pluginRequestCallBack");
         else 
            alert(' 没有注册接口!')
        
    

    var test_adVideoBeginPlay = function () 
        if (window.TencentNews && window.TencentNews.adVideoBeginPlay) 
             window.TencentNews.adVideoBeginPlay();
         else 
            alert(' 没有注册接口!')
        
    

    var refreshTokenCallback = function(a) 
        alert(' ret:' + a);
    

     var test_refreshWxAccessToken = function () 
        if (window.TencentNews && window.TencentNews.refreshWxAccessToken) 
             window.TencentNews.refreshWxAccessToken("refreshTokenCallback");
         else 
            alert(' 没有注册接口!')
        
    

    var test_gotoPushHistoryPage = function () 
        if (window.TencentNews && window.TencentNews.gotoPushHistoryPage) 
             window.TencentNews.gotoPushHistoryPage();
         else 
            alert(' 没有注册接口!')
        
    

    var test_getSecurityRequestCheckCode = function() 
        if (window.TencentNews && window.TencentNews.getSecurityRequestCheckCode) 
             var before = "1537339526";
             window.TencentNews.getSecurityRequestCheckCode(
                content:before,
                onCallback:function (after) 
                alert("before:" + before + " after:" + JSON.stringify(after));
                
             );
         else 
            alert(' 没有注册接口!')
        
    

    var test_writeLog = function() 
        if (window.TencentNews && window.TencentNews.writeLog) 
             var myDate = new Date();
             window.TencentNews.writeLog("签到-signlog","content:" + myDate.toLocaleTimeString());
         else 
            alert(' 没有注册接口!')
        
    

    var test_isAllPushClose = function() 
        if (window.TencentNews && window.TencentNews.isAllPushClose) 
             window.TencentNews.isAllPushClose(
                onCallback:function (ret) 
                alert("ret:" + JSON.stringify(ret));
                
             );
         else 
            alert(' 没有注册接口!')
        
    

    var test_isNotificationEnabled = function() 
        if (window.TencentNews && window.TencentNews.isNotificationEnabled) 
             window.TencentNews.isNotificationEnabled(
                onCallback:function (ret) 
                alert("ret:" + JSON.stringify(ret));
                
             );
         else 
            alert(' 没有注册接口!')
        
    

    var test_gotoPushSwitchSettingPage = function () 
        if (window.TencentNews && window.TencentNews.gotoPushSwitchSettingPage) 
             window.TencentNews.gotoPushSwitchSettingPage();
         else 
            alert(' 没有注册接口!')
        
    

    var test_enableLocalPush = function () 
        if (window.TencentNews && window.TencentNews.enableLocalPush) 
             window.TencentNews.enableLocalPush();
         else 
            alert(' 没有注册接口!')
        
    

    var test_changeTitleColorBlack = function () 
        if (window.TencentNews && window.TencentNews.launchApp) 
            window.TencentNews.setStatusBarColor(0);
         else 
            alert("没有注册接口!");
        
    

    var test_changeTitleColorWhite = function () 
        if (window.TencentNews && window.TencentNews.launchApp) 
            window.TencentNews.setStatusBarColor(1);
         else 
            alert("没有注册接口!");
        
    

    var test_closeWebview = function () 
        if (window.TencentNews && window.TencentNews.launchApp) 
            window.TencentNews.closeWebview();
         else 
            alert("没有注册接口!");
        
    

    var test_isMethodSupport = function () 
        if (window.TencentNews && window.TencentNews.isMethodSupport) 
            window.TencentNews.isMethodSupport('share');
         else 
            alert("没有注册接口!");
        
    

    var test_share = function () 
        window.TencentNews.setShareArticleInfo('分享测试标题', '分享测试长标题',
                '分享测试内容', 'http://www.qq.com',
                'http://mat1.gtimg.com/www/newsapp/img/android/default_list_logo.png');
        if (window.TencentNews) 
            window.TencentNews.invoke('share','qqFriend');
         else 
            alert("没有注册接口!");
        
    

    var test_abc = function()prompt(""method":"getUserInfo","types":["string"],"types":["string"],"args":["alertInfo"],"instanceName":"TencentNews"","");;

    var test_webview_bug = function() 
      setTimeout(test_abc,80);
      location.href='https://www.qq.com/hhhhhhhhhhhhh';
    

    // <!--console.log("window.DeviceMotionEvent");-->
    // <!--var deviceMotionHandler = function () -->
    //     <!--console.log("disableDeviceMonitor window.deviceMotionHandler");-->
    // <!---->
    //     <!--var deviceMotionHandler2 = function () -->
    //     <!--console.log("disableDeviceMonitor window.deviceorientation");-->
    // <!---->
    //     <!--var deviceMotionHandler3 = function () -->
    //     <!--console.log("disableDeviceMonitor window.compassneedscalibration");-->
    // <!---->
    // <!--if (window.DeviceMotionEvent) -->
    //      <!--window.addEventListener('devicemotion', deviceMotionHandler, false);-->
    // <!---->
    // <!--window.addEventListener('deviceorientation', deviceMotionHandler2, false);-->
    // <!--window.addEventListener('compassneedscalibration', deviceMotionHandler3, false);-->
</script>
</body>
</html>

社会化分享(代码片段)

...很多应用都内置“社会化分享”功能,可以将看到的新闻、博客、广告等内容分享到微博、微信、QQ、空间等,为了拉取用户,提高应用的DAU,一般应用都有分享功能。下面咱们从苹果官方自带分享说起:其实... 查看详情

网络爬虫抓取某年份腾讯新闻内容(代码片段)

...div,并且class="hd",BeautifulSoup提供了一个CSS选择器,直接调用select方法即可所以代码可以写成defgetContent(url):html=getHTMLText(url)#print(html)soup=BeautifulSoup(html,"html.parser")title=soup.select("div.hd>h1")print(title[0].get_text())time=soup.select("div.a_Info&... 查看详情

qq分享功能实现-android(代码片段)

...授权软件,所以比较方便。一、准备工作1、创建应用腾讯QQ互联官网进行注册登录,并且创建应用管理,,获取到你的APPID和APPKey。这里我已经完成了2、集成SDKQQ互联的官方文档下载SDK,并将jar包导 查看详情

php加载更多新闻功能(代码片段)

查看详情

常用小功能demo分享

...浪新闻,搜狐新闻,今日头条,聚划算,腾讯视频,优酷等类的频道栏),支持小红点标识&&懒加载&&缓存&&排序&&增删等电子书阅读器,支持txt,epub(图文混排)... 查看详情

实现上下拉刷新mjrefresh(代码片段)

...加入了上拉刷新列表数据,下拉加载更多数据的功能,比如:腾讯QQ,新浪微博,网易新闻,等等很多的社交新闻类都带有这样的功能.下面来就是几种常见的实现方法: 一:UITableView的代理方法效果:   通过使用UITableView的这个代理方法:-(... 查看详情

腾讯出行在微信内测试打车功能;​微软teams全球宕机数小时后恢复正常;ios15.6修复显示储存空间已满问题|极客头条...(代码片段)

...品|CSDN(ID:CSDNnews)一分钟速览新闻点!腾讯出行在微信内测试打车功能,提供聚合出行服务百度发布L4级自动驾驶汽车支付宝全面开放 查看详情

使用友盟分享的步骤(代码片段)

...k接口,我们在v5.0做出了巨大的改变,精简了接口调用的代码。并将分享授权,与评论等功能做出了隔离,使结构更加清晰。所以本版本的功能也只有分享与授权并无其他功能,请开发者注意。注意:本文... 查看详情

javascriptjs调用腾讯视频(代码片段)

查看详情

移动端以及pc浏览器页面分享到朋友圈等的功能实现(代码片段)

...是我们有时候依旧可以在浏览器的某些页面上,例如某条新闻页面上看 查看详情

腾讯新闻多图jquery相册展示效果代码

腾讯新闻多图jQuery相册代码,带左右切换箭头,带缩略图,可左右切换,点击缩略图展示原图。在线演示本地下载 查看详情

腾讯大咖分享|腾讯alluxio(dop)在金融场景的落地与优化实践(代码片段)

...线上运行效果优化调优实践总结展望Alluxio导读近期,腾讯Alluxio团队与CDG金融数据团队、TEGsupersql团队、konajdk团队进行通力协作,解决了金融场景落地腾讯Alluxio(DOP=DataOrchestrationPla 查看详情

关于代码实时分享编辑功能。。。

前天,11月15日,Atom编辑器公布了Teletype,支持多人同时编辑代码。新闻链接:https://blog.atom.io/2017/11/15/code-together-in-real-time-with-teletype-for-atom.html 同时,微软也发布了VisualStudioLiveShare也是类似功能,官网:https://code.visualstud 查看详情

微博qq空间等社交分享插件(代码片段)

...工具,它可以一键分享到微博、QQ空间、QQ好友、微信、腾讯微博、豆瓣、Facebook、Twitter、Linkedin、Google+、点点等社交网站,使用字体图标。安装方式:1.使用cdnjs,引入 share.min.css 与 social-share.min.js&nb 查看详情

使用腾讯云轻量部署firefoxsend临时文件分享服务(代码片段)

FirefoxSend是火狐旗下的临时网盘,它可以在全平台使用,网页式操作,不需要附加组件(而且不限速),可以在任何现代浏览器中使用。以超链接形式分享,可设置分享的文件下载次数、时间和密码ÿ... 查看详情

使用腾讯云轻量部署firefoxsend临时文件分享服务(代码片段)

FirefoxSend是火狐旗下的临时网盘,它可以在全平台使用,网页式操作,不需要附加组件(而且不限速),可以在任何现代浏览器中使用。以超链接形式分享,可设置分享的文件下载次数、时间和密码ÿ... 查看详情

社区分享|腾讯海外游戏基于jumpserver构建游戏安全运营能力(代码片段)

...“2022JumpServer开源堡垒机城市遇见·深圳站”活动中,腾讯海外游戏安全运营负责人林鼎盛分享了题为《锻造行业领先游戏安全技术与运营能力》的主题演讲。以下内容根据本次演讲整理而成。分级分类的安全管理思路在很多... 查看详情

python调用腾讯api实现人脸检测(代码片段)

Python调用腾讯API实现人脸检测1.作者介绍1.腾讯云人脸检测API2.调用API过程1、根据接口文档直接调用2、SDK调用(1)代码解析(2)完整代码(3)运行结果3.拓展实验4.问题与分析1.作者介绍张玉,女,... 查看详情