Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Facebook Connect integration in website

Go to End

5 Posts   1728 Views


Community Member, 63 Posts

28 June 2012 at 9:13pm

Hey there,
Just wondering how I can leave my Facebook app connected to a user as soon as they launch the app and not click on LOGIN now and then.


Community Member, 63 Posts

28 June 2012 at 9:36pm

I want users to be able to access the app and be automatically logged into the app and stay logged in


Community Member, 6 Posts

28 June 2012 at 11:22pm

Hy buddy.
At first you can't access your app without being logged in. In fact you need a so called access token for your app.
To get more informations how to generate the token look here:

And here is a code example from my events_facebook import to get events from specific page and display it in silverstripe

require_once 'fb_api/facebook.php';

// Authenticate
$facebook = new Facebook(array(
'appId' => 'your_app_id',
'secret' => 'your_app_secret',
'cookie' => true, // enable optional cookie support

// Attempt to fetch SpiritGallery's events page
// place access token for your fanpage after events?access_token=
// also place your fanpage that you would like to pull events from in $events=$facebook->api('/fanpage_here/
}catch (FacebookApiException $e){

// Iterate through each event
foreach ($events["data"] as $event){

I hope this helps for the first time.


Community Member, 1 Post

29 June 2012 at 6:41am

Edited: 29/06/2012 6:41am

Hey, wonder if you tried apps like LoginRadius ? I am using it and it's easier than going through all these complicated APIs.


Community Member, 63 Posts

29 June 2012 at 9:28am

Does this code make/or cover the entire website having the user logged in?
Thank you for your response it's much appreciated =)