I installed the Mirror API sample scripts (PHP) on my (non-ssl) webserver and made some changes to it so it inserts some interesting solar panel data on my Google Glass timeline. Works fine. The adapted sample script now inserts a card on the timeline when I access this PHP web page using a web browser.
My next step would be to insert cards at a regular time interval or by some kind of trigger (e.g. voice command) but certainly not by accessing this web page using a web browsr. I am clearly missing out on something because I still don't see how to go about this... Any help will be greatly appreciated.
I'm not a php guy, but the idea is same in general.
When user comes to your site, your responsibility is to grant access, via OAUTH2 (as far as I can see you successfully passed that step)
When oauth dance finished, your responsibility is to save access_token and verify_token + userId + etc. to the database. (it should also be done, in a google sample)
To get periodical updates will require you to write some peace of code, for instance:
cron jobs (raw idea: http://www.mkyong.com/google-app-engine/cron-job-on-google-app-engine-for-java/ )
where you have to use Mirror Api libraries, provided for language you accepts, or do cook a raw HTTP requiests, as mentioned in https://developers.google.com/glass/v1/reference/timeline
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With