Google Drive Plugin v0.1

Release Notes:

TODO

  • Store user specific authorisation code in database so users have to logon to Google only once (don't know how to and where, guess there is something for that Help and tips appreciated)
  • Search functionality to search for specific Google Drive document matching some keyword, results wil show as document items
  • Selen

    Thanks.

  • thouseef19

    I've been just wishing for  a GDrive integration : )
    This can certainly decrease hosting burden ! I hope other developers join and make this the perfect plugin : )

  • Tauvic Ritter

    I use this plugin for a church intranet. We can now setup a seperate directory for each working group of volunteers and people can start sharing documents within the context of the Elgg environment. Next steps are to extend the standard Elgg search functionality to include search within Google Drive for documents.

  • Dror Steiner

    fantastic! any similar interaction with Dropbox is available somewhere?
     

  • DhrupDeScoop

    hmmm... this sounds so familiarrr.. just cannot remember where, who, when.. ;-\ i maybe shud flip thru my emails.. gotta be in there somewhere!;-X

  • Antonio Arebalo

    BIIIIIGGGGG "Thank you".

    I needed this

  • Human Connect

    Hi guys,

    I can't believe I'm asking that, but where can I create my API keys ?

    thanks in advance

  • Jeroen Dalsem

    @tauvic you can store the user authentication keys in the user plugin settings. http://reference.elgg.org/1.8/engine_2lib_2plugins_8php.html#a722d916f06791ea05196d6c5464b4427

  • thouseef19

    Thank you, Jeroen Dalsem.

    @tauvic you can store the user authentication keys in the user plugin settings. http://reference.elgg.org/1.8/engine_2lib_2plugins_8php.html#a722d916f06791ea05196d6c5464b4427

  • thouseef19

    @odutel,

    where can I create my API keys ?

    Here: https://developers.google.com/drive/quickstart-php

     

     

     

  • Tauvic Ritter

    Thanx @thouseef19 for the tip on user plugin settings, i will look into it.

    Also good info about how to create that API key. I will include it in the documentation.

  • thouseef19

    @Tauvic: You got the wrong person "thanx" for the plugin tip. Jeroen Dalsem gave you the tip : ) Thank him ; )

    & thank you again for the amazing plugin: )

  • Michele

    Hi Tauvic,

    great idea, thank you for sharing!

    I'm trying it but get the following error after putting all of the details in the plugin settings and clicking on login in the widget and putting my google details in:

    Error:redirect_uri_mismatch

    The redirect URI in the request: http://MYSITE/oauth2callback did not match a registered redirect URI

    Where am I wrong? Other than activating and setting the plugin should I also follow all of the steps suggested here https://developers.google.com/drive/quickstart-php ?

    Cheers

  • Tauvic Ritter

    Hello @Michele,

    Ah, you found something that i have to document. Google requires you to specify a callback url when you configure Google API on the Google side, this is a security requirement. I have to find out what exactly should be specified. I think it includes your webserver url and oauth2callback as i remember. I will come back on that.

  • Tauvic Ritter

    Found this solution: there is an Google API Console there you see "API Access" then "Client ID for web applications" then update "Authorized Redirect URIs" and add http://MYSITE/oauth2callback

  • Michele

    Hi @Tauvic,

    Thank you so much for replying. Seems not to work, when clicking on login in the widget I do go to google who asks to permission to access, click on OK but then redirects back to the profile page and in the widget gives me a file not found (Error calling GET https://www.googleapis.com/drive/v2/files/xxx) but it does exist and the spelling has been checked many times, it is correct. Any clue? Thanks for reading

  • Tauvic Ritter

    In the widget you have to specify the correct Google drive folder id. That is the big number you see when you use your webbrowser to access Google Drive. It looks like https://drive.google.com/?tab=mo&authuser=0#folders/0Bz5uaqlHTrydQ1BENkRiZy1KQsQ. Then you copy this funny code 0Bz5uaqlHTrydQ1BENkRiZy1KQsQ in the widget. I think you mistyped somewhere.

    When i make an error on purpose i get: 

    Error calling GET https://www.googleapis.com/drive/v2/files/@0Bz5uaqlHTrydQ1BENkRiZy1KQsQ: (404) File not found: @0Bz5uaqlHTrydQ1BENkRiZy1KQsQ

     

    I added the @ sign here to force an error.

  • Tauvic Ritter

    O and maybe it is not having enough access rights to the directory.

  • Michele

    Thank you Tauvic!

    It could surely sound stupid to you but...as Folder I was typing the folder's name...not the 'funny code'...I know...but maybe not so easy to understand for normal users, what about typing some help tip close to 'Folder ID' such as '(ie 0Bz5uaql....)? I guess many users will ask. Just a thought though :)

    FYI, after putting the right ID, login to google ok but I was redirected to the site's homepage instead of the profile page where the widget is and I received a warning message '...token..missing field...'.Went back to the profile, logged in again with google and then worked fine

    Cheers Tauvic!

  • Tauvic Ritter

    Yes, great you solved it. I also sometimes run into the warning message '...token..missing field...'. I don't know where that is comming from. Im not the expert in this field so it is still a mystery to me. 

    Any help on making this plugin more reliable is appreciated! I think my usage of the Google Oauth2 libray is not 100% correct.

  • S.Brady.Hussain

    i can not get this working i gave up let me know when a more simple version comes along or is updated would love working drop box plugin

  • Nestor

    Hi there,

    I active the Drive API and put in the plugin the client secret and the other information that it needs. Then I sve the changes and go to the widget area, where it says to me "Log in", but when I click on the link, there appears an error that says "there's a problem with oauth2", or something like this.

    I try to resolve it from myself, but I dont know how. I put again the information that the plugin need from me, but no solve the problem. If you need more information to try to give a solution, say to me, thanks.

     

Tauvic Ritter

Enthousiastic Elgg user, working on a social intranet for my church community

Stats

  • Category: Widgets
  • License: GNU General Public License (GPL) version 2
  • Updated: 2012-12-30
  • Downloads: 1041
  • Recommendations: 10

Other Projects

View Tauvic Ritter's plugins