Answer the question
In order to leave comments, you need to log in
Completely “your own” Facebook feed on the site?
sorry for the tags in advance as not a master at this.
There are posts in the Facebook group, and we need to insert them into the site, but with my template.
Please tell me in what way I can get the data I need into variables, and already insert information into the template from them.
Answer the question
In order to leave comments, you need to log in
$me = curl_init();
curl_setopt($me, CURLOPT_URL, "https://graph.facebook.com/v2.5/{COMMUNITY_ID}/posts/?fields=description,full_picture,message&format=json&access_token={ACCESS_TOKEN}&limit=25");
curl_setopt($me, CURLOPT_RETURNTRANSFER, true);
$curl = json_decode(curl_exec($me), true);
$data = $curl['data'];
static $id = 0;
while ($id <= 15) {
echo ' <h1>' . $data[$id]["message"] . '</h1>';
$id--;
}
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question