Facebook API: Fetch events from Page as decoded JSON (Object)

<?php // JSON echo file_get_contents("https://graph.facebook.com/{page-id}/events?access_token={access-token}"); // Object print_r(json_decode(file_get_contents("https://graph.facebook.com/{page-id}/events?access_token={access-token}"))); ?>
Facebook v2.8 - Facebook-Page-App required ( https://developers.facebook.com/apps/)

page-id
http://findmyfbid.com

token (App Token)
https://developers.facebook.com/tools/accesstoken/

1 Response

Deprecated since DSGVO

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.