Welcome to WebmasterWorld Guest from 54.145.209.107

Forum Moderators: httpwebwitch & not2easy

Displaying events from Facebook

   
6:46 pm on Jan 21, 2011 (gmt 0)

5+ Year Member



Hi all,

Is there a way to display events from a Facebook page on an external site?

I know theres the apps to display live streams, wall posts and likes and such, but not for just the events.

Anyone know how?
7:01 pm on Jan 21, 2011 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



See the Graph API Reference > Event [developers.facebook.com]
7:16 pm on Jan 21, 2011 (gmt 0)

5+ Year Member



That doesn't seem right.

It seems to talk about a specific event, rather than listing a feed of the page's events. Or have I read it wrong?
7:48 pm on Jan 21, 2011 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



FB is deprecating the old REST API:

[developers.facebook.com...]

And is recommending using the new Graph from here on out. Poke around in the Graph docs and you'll likely find what you need.

[developers.facebook.com...]
8:18 pm on Jan 21, 2011 (gmt 0)

5+ Year Member



Not worked with Graph API's before so I have no idea where to start. From what I've seen, its basically grabbing content from the URL, but I need to do it via Javascript I guess?

Or will it be via an iframe like the usual feed stream/like box?
8:24 pm on Jan 21, 2011 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I use the JS SDK. There are also links on those developer docs to some Samples [developers.facebook.com] to get you started as well.
9:09 pm on Jan 21, 2011 (gmt 0)

5+ Year Member



Ah ok. Thanks.

Will see what happens :)
4:03 pm on Jan 22, 2011 (gmt 0)

5+ Year Member



You don't necessarily need to use the javascript SDK, you could use the PHP one or something similar. Just to build on what was said earlier, you basically need an oauth access_token to make your request. But as event is a connection to page, you should just be able to pull back your events as a json respones. So your request will be something like:

[graph.facebook.com...] page id or name here>/events?access_token=<your access token>

Hope this helps
9:13 pm on Jan 22, 2011 (gmt 0)

5+ Year Member



Helps a bit, but what is the access token? I've tried to Google about it but I cant make much sense of it. I cant use PHP to get the access token as the script is going into a CMS system where its just html/css/javascript.
9:59 pm on Jan 22, 2011 (gmt 0)

5+ Year Member



hmm, well the auth token is composed of your app id and your api secret. I think it is possible to use this in JS still
3:37 pm on Jan 25, 2011 (gmt 0)

5+ Year Member



Tried Google again, and the Facebook developers forum, but there doesn't seem to be anywhere that says how to get the auth token or access token, how do you get one?

I have no app, I just have the page ID.
3:50 pm on Jan 25, 2011 (gmt 0)

5+ Year Member



You'll need to create an application (do this by adding the developer application to your account). Then you'll need to add this app to your facebook page
 

Featured Threads

Hot Threads This Week

Hot Threads This Month