-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslider.php
More file actions
37 lines (35 loc) · 1.24 KB
/
slider.php
File metadata and controls
37 lines (35 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Copyright 2018 Social Manager.
*
* PHP version 7.2.8
*
* @category Album_Manager
* @package Facebook
* @author Kishan Jasani <kishanjasani007@yahoo.in>
* @license https://rtfbchallenge.000webhostapp.com/privacy_policy/privacy_policy.php
* @link ""
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to
* use, copy, modify, and distribute this software in source code or binary
* form for use in connection with the web services and APIs provided by
* Kishan Jasani.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND
*/
require_once "fb-callback.php";
if (isset($_GET['albumId'])) {
$albumId = $_GET['albumId'];
$response_albums = $fb->get($albumId . "/photos?fields=images,id&limit=100", $accessToken);
$albums = $response_albums->getGraphEdge()->asArray();
$slides = "";
foreach ($albums as $album) {
$albumUrl = $album['images'][0]['source'];
$slides .= '<div class="mySlides fade">';
$slides .= '<img src="'. $albumUrl .'" style="width:100%; height: 450px"></div>';
}
$slides .= '<a class="prev" onclick="plusSlides(-1)">❮</a>';
$slides .= '<a class="next" onclick="plusSlides(1)">❯</a>';
echo $slides;
}
?>