[foaf-dev] Facebook bridge
bergi <[email protected]> Mon, 18 Jul 2011 20:27:09 +0200
| Newsgroups | gmane.comp.web.rdfweb |
|---|---|
| Message-ID | <[email protected]> |
Hi, This code was lying around on my hard disk for a while now. Today I had time to clean it up and bring it online. Unlike a foaf file generator the bridge is designed create semantic web links. If you want to link to people which still stuck in Facebook you can add a knows property using a object like that [1]. The bridge can access public information, but is also able to use WebID for authentication. If you access the page [2] the first time you can follow the authorize link to bind the OAuth authorization code to your WebID. The source code is available in my Subversion repository [3]. The current code uses a quick 'n' dirty file persistence. This should be changed before it's used in a wider scope. As it's based on the Facebook Graph API it shares the limitations. For example it's not possible to see the friend list of a friend. The bridge is also a nice example how easy it is to use the ResourceMe WebID login code. The only class which contains WebID specific code is the WebIdAuthCodeProvider. Including the "require" and "use" code 5 lines of code are required: require_once(LOGIN_WEBID_ROOT . "LoginWebId.php"); use org\bergnet\login\webid\FoafSslLogin; $foafSslLogin = new FoafSslLogin(); $foafSslLogin->doLogin(); $this->webId = $foafSslLogin->getAgents(); the bergi [1] https://resourceme.bergnet.org/bridge/facebook/?id=$facebookid [2] https://resourceme.bergnet.org/bridge/facebook/ [3] https://www.axolotlfarm.org/svn/bergi/bergnet/php/bridge-facebook/