I am trying to install Facebook Connect to my SilverStripe sites and the information provided by Willrossi on github is a load of rubbish. When he says to put something somewhere he never specified actually WHERE.
such as:
You need to add the fb: namespace to your Page.ss file. For example your tag at the top should look like
<html lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">
^ he doesn't even say which of the three page.ss files to use or all.
----
If you haven't disabled the FacebookConnect::$create_member variable you can access the Facebook's member information by using:
<% control CurrentMember %>
$FirstName $LastName $Avatar(small)
<% end_control %>
^ In the above he doesn't say where this variable even is...for someone who doesn't know SilverStripe that much yet this is just sub-standard guidance.
----
and also
Once you have done that you should be able to use the includes provided in this module.
<% if CurrentFacebookMember %>
<p>Hi $CurrentFacebookMember.FirstName</p>
<% include ConnectLogout %>
<% else %>
<% include ConnectLogin %>
<% end_if %>
You can also access the Facebook member information in your PHP code. The Facebook API connection and current member are cached on the controller object. So for example if this is in your Page_Controller class
// returns the current facebook member (wrapped in a SS Member Object)
$this->getCurrentFacebookMember();
// returns the API connection which you can use to write your own query
$this->getFacebook();
^ Once again, above he doesnt mention anything about where all this would go!
Is anyone able to write a proper guide which explains things properly?