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

<?php $page_id = "xxx"; $app_id = "xxx"; $token = "xxx"; $object = json_decode(file_get_contents("https://graph.facebook.com/v2.8/".$page_id."/events?fields=id,name&access_token=".$token)); ?> <pre> <?php print_r($object); ?> </pre>
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.