dimanche 1 février 2015

Get Events from Facebook Page with php


Vote count:

0




I'm trying to get the events from a Facebook page with a http request. It worked for the last 2 month, but now I'm getting this error:



failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request



Here is my request:



$year_range = 2;

$since_date = date("d.m.Y", time());
$until_date = date('d.m.Y', strtotime('+' . $year_range . ' years'));

// unix timestamp years
$since_unix_timestamp = strtotime($since_date);
$until_unix_timestamp = strtotime($until_date);

$fields="id,name,description,location,venue,timezone,start_time";

$json_link = "http://ift.tt/wljqS4" . $facebook_page_id . "/events/feed/?fields=" . $fields . "&access_token=" . $access_token . "&limit=200&since=" . $since_unix_timestamp ."&until=" . $until_unix_timestamp;
$json = file_get_contents($json_link);


Can anyone help me with this issue? I have no clue why this is not working anymore.


Thanks in advance! Peter



asked 52 secs ago







Get Events from Facebook Page with php

Aucun commentaire:

Enregistrer un commentaire