View Source

<h1>About Me</h1>

<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>


<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="">auth processes</a>&nbsp;(both for iframe applications, and 3rd party websites), a&nbsp;subsequently&nbsp;access to the <a href="">Graph API</a>, <a href="">Open Graph</a> meta tags, plus wrapper code generation for&nbsp;<a href="">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>

<p><a href=""></a></p>

<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.</em></p>


<p>There are two primary methods of authentication, that for iframe applications that are &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 &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>

<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>


<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>Open Graph meta tags</h1>

<p>Should allow meta tags to be automatically (or otherwise) added to the document header, probably using HeadMeta view helper.</p>

<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>