Connecting Onedrive to webpage

心已入冬 提交于 2019-12-08 10:02:41

问题


I have a MS- Onedrive business account. I need to connect my onedrive to my webpage, to view folders, download files, etc. How can I intergrage Onedrive with my webpage using PHP? Can anyone help me?


回答1:


The OneDrive File picker might be your best bet if you simply want to get list of files, folder location, and downloand/update files from OneDrive. This uses the JavaScript API so you'll need to incorporate that into your site. Setup is pretty simple. Register your application at https://account.live.com/developers/applications to get important info to authenticate/authorize the user and make calls to the service (i.e. client_id, client_secret, etc.) then take a look at the sample code at https://msdn.microsoft.com/en-us/library/dn659733.aspx. If this is for OneDrive for Business, you want to look at https://msdn.microsoft.com/en-us/office/office365/api/files-rest-operations. Hope that helps.




回答2:


I don't think they have an API for PHP, you might have to use JavaScript if you want to follow an API. Have a look at this.

You can still use PHP but you will have to build it from zero. Take advantage of the HTTP requests, click here.

Here is an example in PHP for the old name Skydrive




回答3:


You may want to have a look at the OneDrive SDK for PHP. It's GPLed, supporting the latest OneDrive specifications, and the API is straightforward to get started within minutes.

Have a look at the examples provided and/or comments in the source code for some examples.

Disclaimer: I'm the author of this library.



来源:https://stackoverflow.com/questions/28737447/connecting-onedrive-to-webpage

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