How To Display Facebook Page Events on Website using PHP?


Hi Visitor,

You may now try to use a "Page access token" to make the events API work. This will work only if you are an admin of the Facebook page you're trying to get events from.

Assuming you already created your Facebook app, get your page access token in this page.

Select your "Application" on the upper right corner, currently, the selected one might be the "Graph API explorer". Change it to your application.

Once changed, go to the drop down under it where you can select your page. Select your target page.

On the "Access Token" field or box, you can see the random string of characters, that should be your "Page access token"

Extend the page access token by entering the page access token in the box here. Click "Debug".

You will see the "Extend Access Token" button, click it.

Copy the generated random string of characters, that will be your final "Page Access Token".

Copy the page access token and apply in to the $access_token variable on our script.

Mike Dalisay
Founder, codeofaninja.com

Before we start coding, you might be someone NOT interested in coding. If that's the case, you should use a website plugin like SociableKIT. Watch the following video.

Need to embed a single Facebook page event on your website? Watch this tutorial.

What's next? You can try SociableKIT now, view a live demo here and here or continue with the code tutorial below.

Let's code!

Do you have an event manager on your website? Do you create events on your Facebook page? If your answer is both YES, you're wasting a lot of time managing your brand's events information online.

What if there's a way to create an event ONCE, and then let it appear both on your Website and Facebook page? Will you be happy saving your precious time? Our code for today will make you happy then, just like we are!

Today we're gonna talk about how to display publicly available Facebook Page EVENTS on your website. This one is great if you want your Facebook page events to be shown in your website in a synchronized way.

Once you created or updated an event on Facebook, it will be automatically reflected on your website too. The advantages and risks of this is almost the same with what I discussed in my first post  related to this one.

Read more