How to use one drive file picker in browser?

前提是你 提交于 2019-12-06 16:56:53

I solved this issue by including the js script in my callback page, wl sdk will automatically handle the oauth process for you.

<script type="text/javascript" src="//js.live.net/v5.0/wl.js"></script>

It's weird as I could not find any documents related to how you should do with your callback page on MS developer website.

Can you get the "Using the open from OneDrive picker" sample working on http://isdk.dev.live.com?

Use the function below in your js file and don't forget to include :

<script type="text/javascript" src="https://js.live.net/v7.0/OneDrive.js"></script>




 function launchOneDrivePicker() {
        var odOptions = {
            clientId: "*******************************",
            action: "download",
            multiSelect: true,
            openInNewWindow: true,
            advanced: {
                queryParameters: "select=id,name,size,file,folder,photo",

                redirectUri: (Eneter your default url e.g :)"http://localhost:60666/WebForm1.aspx"
            },
            success: function (response) { /* success handler */      },
            cancel: function () { /* cancel handler */ },
            error: function (e) { /* error handler */ },
        };
        OneDrive.open(odOptions);
    }

I hope it works for everyone thanks.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!