无法获取skydrive中文件数量的计数 [英] Not able to get the count of the number of files in skydrive

查看:69
本文介绍了无法获取skydrive中文件数量的计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

代码为,


function getCount()

{

    WL.api({路径:" / me / skydrive"},&
        function(resp){

           如果{

&NBSP(resp.error!);    &NBSP ;         的document.getElementById(QUOT;计数")。的textContent = resp.count;

   &NBSP ;       }

           否则

            {

                的document.getElementById(QUOT;计数")。的textContent = resp.error.message;

            }
$


       });


}


  WL.ui({

  ;                  名:"登入" ;,

                 &NBSP ; 元素:" btnConnect的" ;,

                 &NBSP ; 品牌:"网盘" ;,

                 &NBSP ; 范围:" wl.signin wl.skydrive"

                })


中的ErroeMessage:"访问令牌需要请求此资源的SkyDrive"

解决方案
尝试指定" wl.skydrive" ;作为WL.init中的一个范围而不是WL.ui,或添加"WL.login({scope:" wl.skydrive" })"在致电WL.api之前。


The code is,

function getCount()
{
    WL.api({ path: "/me/skydrive" },
        function (resp) {
            if (!resp.error) {
                document.getElementById("count").textContent = resp.count;
            }
            else
            {
                document.getElementById("count").textContent = resp.error.message;
            }

        });

}

 WL.ui({
                    name: "signin",
                    element: "btnConnect",
                    brand: "skydrive",
                    scope:"wl.signin wl.skydrive"
                })

The ErroeMessage : "an access token is required to request this resource skydrive"

解决方案

Try specifying "wl.skydrive" as one of the scopes in WL.init instead of in WL.ui, or adding a "WL.login({ scope: "wl.skydrive"  })" before calling WL.api.


这篇关于无法获取skydrive中文件数量的计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆