Facebook Associates

I’m currently in the process of setting up the 3DN Politics site, a site through which friends connected to each other through Facebook can automatically share articles they publish on their friends’ walls. Essentially, this site lets associates sign up to the site by using their facebook identity to sign up to the site and allowing a Facebook application certain privileges.

I will use this article as a scratchpad for those developers willing to learn more about the Facebook Graph API and the Facebook PHP SDK as I go, hoping that it will be useful.

Facebook PHP SDK 3.0.0

There’s a choice to be made here; We can develop a full WordPress plugin and embed the Facebook PHP API functionality in it or we can simply work on building a standalone Facebook IFRAMES app. I’ve chosen the latter for simplicity but I may later incorporate this into a WordPress plugin.

I’ll assume you have some basic understanding of how to create a facebook app and where to find the appid and the app secret.

So in the index.php of your app, start with setting up the following:

 
 
$fbconfig['appid'] = "";
 
$fbconfig['secret'] = "";
 
$fbconfig["baseUrl"] = "";
 
$fbconfig["appBaseUrl"] = "";

About the Author

I'm the technical maintainer of the 3DN Network. Through setting up the 3DN Network I look forward to maintaining my company site, technology site, politics site and football site.