Brian Riviere • over 9 years ago
Green Button PHP example
I have been looking at the tendril greenbutton oAuth example http://dev.tendrilinc.com/blog/tendril-connect-sample-app-for-london-hackathon and I was wondering if it would be to possible to have a similar php example using Test-Lab-Service endpoints?
Comments are closed.
3 comments
Bianca Sayan • over 9 years ago
BrianR1,
My PHP codeigniter implementation is available on github, if that helps:
https://github.com/bianca/ontariogreenbuttonincodeigniter
It's just built on top of an oauth library, but if you're not using codeigniter you can just copy all of the curl stuff out of:
https://github.com/bianca/ontariogreenbuttonincodeigniter/blob/master/sparks/oauth2/0.4.0/libraries/Provider/Greenbutton.php
and get the endpoints out of the .sql file.
Brian Riviere • over 9 years ago
Hello Bianca
I'm not really familiar with the code igniter framework. Once I have the codeigniter framework installed I would then copy everything to the application directory?
thanks
Brian
Bianca Sayan • over 9 years ago
Hi Brian,
You gotta go get the codeigniter library, then the Oauth2 library (https://github.com/philsturgeon/codeigniter-oauth) that I based my stuff off of (look up "codeigniter installing sparks).
Then dump my stuff in; it will line up with existing folders.
Again, you really don't have to use codeigniter if you don't want to. You could just copy all of the curl in my library and dump it in any php implementation.