Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/justinribeiro/googleplus-api-callout-php-jquery

Pulling data from Google Plus streams with PHP and displaying with jQuery
https://github.com/justinribeiro/googleplus-api-callout-php-jquery

Last synced: 8 days ago
JSON representation

Pulling data from Google Plus streams with PHP and displaying with jQuery

Awesome Lists containing this project

README

        

Pulling data from Google Plus streams with PHP and displaying with jQuery
=================================

The following example pulls data from the Google API for Google+ via PHP, stores the data in cache file (which is checked on an interval of 10 minutes), and
then is muxed with a jQuery ajax converter to inject into a jsRender template.

Things you need to make this work
===


  1. Google API key (https://code.google.com/apis/console/)

  2. Google+ User ID (the working example uses my id)

  3. Write access to whereever me.json gets written

Things to note
===


  1. You don't have to use jsRender (it's overkill for this simple example, but I was previsouly testing something else so I left it). Note this is the OLD version of JsRender; the new version has a different template format.

  2. Similarly, you don't have to use the ajax converter (you could very well do that server side or change the API call query). Again, I was testing something else, so it stuck around.

  3. The Google API for Google+ has a courtesy limit of 1,000 queries per day, hence the json cache file.

  4. You could very well write the exact same cache script in Node.js, Ruby, Python, Perl, whatever. There's nothing inherently special about the PHP.

  5. The API query really only looks for type "article" for shared links; you can pretty much pull back anything you want. I just used this as a simple example case.

  6. This doesn't use the Google Plus PHP helper (http://code.google.com/p/google-plus-php-starter/), which wasn't out when I wrote this example.

Working Example
===
http://stickmanventures.com/labs/demo/googleplus-api-callout-php-jquery/

Blog blog blog
===
The small write up about it via the SV blog.