Version 1 by Gary Hockin
on Mar 06, 2012 09:51.

compared with
Current by Gary Hockin
on Mar 06, 2012 10:08.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (29)

View Page History
h1. About Me
<h1>About Me</h1>

I <p>I am a PHP/ZF1 programmer who works full time with the Facebook platform, in both PHP and Javascript. More information on our products can be provided on requests.</p>

h1. Introduction
<h1>Introduction</h1>

Zend\Service\Facebook is proposed to be a gateway class to the services offered by Facebook, primarily providing access to both of the [auth processes|http://developers.facebook.com/docs/authentication/]&nbsp;(both for iframe applications, and 3rd party websites), a&nbsp;subsequently&nbsp;access to the [Graph API|http://developers.facebook.com/docs/reference/api/], [Open Graph|http://developers.facebook.com/docs/opengraph/] meta tags, plus wrapper code generation for&nbsp;[Social Plugins|http://developers.facebook.com/docs/plugins/]. Eventually, I envisage that it also provides some php generated Javascript to perform common Facebook integration tasks, very much like Zend_Dojo works in ZF1.&nbsp;There is currently nothing like this in ZF1.
<p>Zend\Service\Facebook is proposed to be a gateway class to the services offered by Facebook, primarily providing access to both of the <a href="http://developers.facebook.com/docs/authentication/">auth processes</a>&nbsp;(both for iframe applications, and 3rd party websites), a&nbsp;subsequently&nbsp;access to the <a href="http://developers.facebook.com/docs/reference/api/">Graph API</a>, <a href="http://developers.facebook.com/docs/opengraph/">Open Graph</a> meta tags, plus wrapper code generation for&nbsp;<a href="http://developers.facebook.com/docs/plugins/">Social Plugins</a>. Eventually, I envisage that it also provides some php generated Javascript to perform common Facebook integration tasks, very much like Zend_Dojo works in ZF1.&nbsp;There is currently nothing like this in ZF1.</p>

<p>An incredibly poor starting point that was knocked up before beta1 was released (and therefore doesn't use DI or anything) can be found here:</p>

[https://github.com/Spabby/ZF2-Style-Facebook-Service|https://github.com/Spabby/ZF2-Style-Facebook-Service]
<p><a href="https://github.com/Spabby/ZF2-Style-Facebook-Service">https://github.com/Spabby/ZF2-Style-Facebook-Service</a></p>

_Please <p><em>Please note this is not even meant to be taken as code that will make it into the final release, it is literally something I messed about with to understand a very early version of ZF2._ ZF2.</em></p>

h1. Authentication
<h1>Authentication</h1>

<p>There are two primary methods of authentication, that for iframe applications that are "hosted" &quot;hosted&quot; on the Facebook platform, and an oAuth 2.0&nbsp;implementation&nbsp;that allows 3rd party sites to auth directly (sometimes known as Facebook Connect). The former is a simple case of decoding some posted data, and will be skipped over here. The latter however, would firmly rely on Zend\Http\Client and Zend\Session\Container. The discussion on&nbsp;whether&nbsp;it should use Zend\OAuth and it's&nbsp;descendants&nbsp;will need to be had, but unless we create Zend\OAuth\Facebook or similar, I believe that Facebook have created their own "unique"&nbsp;implementation&nbsp;that &quot;unique&quot;&nbsp;implementation&nbsp;that will have to be coded for, and a generic solution will not work. I know very little about the whole oAuth 2.0 debacle, so hopefully someone can help to make some&nbsp;decisions&nbsp;here.</p>

h1. Graph API Access
<h1>Graph API Access</h1>

<p>Again, would rely heavily on Zend\Http\Client, and Zend\Service\Facebook\Auth (above). Should provide wrapper functionality to all the entry points, and return data in a&nbsp;consistent, object-orientated manner.</p>

h1. Open Graph meta tags
<h2>FQL</h2>

Should allow meta tags to be automatically (or otherwise) added to the document header, probably using HeadMeta view helper.
<p>FQL or Facebook Query Language is a nice way you can access the API grabbing only the data you want and need. It is loosely based on SQL. What would people like to see here, a simple and easy wrapper to pass pre-constructed FQL queries, or something similar to Zend\Db\Select where you can programmable construct and run FQL queries?</p>

h1. Social Helpers
<h1>Open Graph meta tags</h1>

Should have view helpers (or similar) that allow easy creation of Facebook's "Social Helpers", basically javascript code that creates an iframe with "like this" or "comment on facebook" boxes.&nbsp;
<p>Should allow meta tags to be automatically (or otherwise) added to the document header, probably using HeadMeta view helper.</p>

h1. To Finish
<h1>Social Helpers</h1>

<p>Should have view helpers (or similar) that allow easy creation of Facebook's &quot;Social Helpers&quot;, basically javascript code that creates an iframe with &quot;like this&quot; or &quot;comment on facebook&quot; boxes.&nbsp;</p>

<h1>To Finish</h1>

<p>I'd love to get some discussion going, I think that the Auth and Graph API access would be priority, and should be fairly straightforward and easy to get to beta stages. I would hope that this component would become the industry standard for access to Facebook's platform.</p>