Google drive api ver3 how share on my web page

寵の児 提交于 2019-12-12 05:24:26

问题


Can somebody help me? I could add the file to my webPage in version 2 like this (img1): drive.files().get(fileID).execute().getAlternateLink()); How i can do this in ver3 ?? All of this method return null: getWebContentLink ,getWebViewLink,getThumbnailLink 2) How i can get full access auth? Google examples doesn't works img1


回答1:


In Drive v3, to retrieve metadata properties (i.e. WebViewLink, thumbnailLink,emailAddress, etc.), you will only need to specify the individual fields required by the app.

Try something like this (example in Python):

file_id ='XXXXXXXXXXXXXXXXXX'
file = service.files().get(fileId=file_id, fields='webViewLink').execute()
    print 'Title: %s' % file['webViewLink']

Hope this helps. Good luck!



来源:https://stackoverflow.com/questions/35317660/google-drive-api-ver3-how-share-on-my-web-page

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