access graph data without forcing user to login

Go To


I am looking to pull data from a fb page to a website without having a user authenticate.

The data I wish to display on a webpage is the event listing for a fb page, both the page and the events are open, and I can grab the page and event data ok, eg

But to get a list of the events in order to get the eventIDs an access token is required eg

Is this possible to get this data without having a user login to fb and authorise with an application ? I have looked at just saving an access token but this seems to expire.

any suggestions/pointers would be great, thanks in advance

2012-04-03 23:37
by Keet
Short answer, no - Paul Dessert 2012-04-03 23:46
Thanks @Paul that's what I was thinking, I suppose there is no long answe is there - Keet 2012-04-04 12:04


Providing a quick solution to this set up an app and get an access token, note it would be best to cache the result data so as to not make an api call on each page load


//set your app id, client_secret and fb id
$client_id = 'xxx';
$client_secret = 'xxx';
$fbID = 'xxx';

//get an access token
$access_token = file_get_contents("    type=client_cred&client_id=".$client_id."&client_secret=".$client_secret);

//use this access token to return the events
$jsonurl = "$fbID/events?$access_token";
$json = file_get_contents($jsonurl,0,null,null);

// do stuff with $json
2012-04-20 17:24
by Keet