OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
facebook
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/28/2024 11:03:35 AM
rwxrwxr-x
📄
accessTest copy.php
657 bytes
10/10/2024 10:19:25 AM
rw-r--r--
📄
accessTest.php
657 bytes
10/10/2024 10:19:25 AM
rw-r--r--
📄
back_fb_post_handler.php
9.41 KB
10/10/2024 10:19:25 AM
rw-r--r--
📁
backup
-
10/10/2024 10:19:31 AM
rwxr-xr-x
📄
composer-setup.php
57.07 KB
10/10/2024 10:19:25 AM
rw-r--r--
📄
composer.json
64 bytes
10/10/2024 10:19:25 AM
rw-r--r--
📄
composer.lock
2.81 KB
10/10/2024 10:19:25 AM
rw-r--r--
📄
composer.phar
2.86 MB
10/10/2024 10:19:29 AM
rw-r--r--
📄
configuration.txt
79 bytes
10/10/2024 10:19:26 AM
rw-r--r--
📁
cream
-
10/10/2024 10:19:32 AM
rwxr-xr-x
📄
credential copy.json
556 bytes
10/10/2024 10:19:29 AM
rw-r--r--
📄
credential.json
556 bytes
10/10/2024 10:19:29 AM
rw-r--r--
📄
db_connect.php
341 bytes
10/10/2024 10:19:29 AM
rw-r--r--
📄
facebook_setup.php
10.45 KB
10/14/2024 07:50:50 AM
rw-r--r--
📄
facebook_setup_handler.php
1.23 KB
10/16/2024 07:25:53 AM
rw-r--r--
📄
fb_post_handler copy.php
6.55 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
fb_post_handler.php
12.35 KB
10/10/2024 11:44:18 AM
rw-r--r--
📄
fb_share.php
8.94 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
function.php
18.91 KB
10/16/2024 07:22:46 AM
rw-r--r--
📄
index.php
476 bytes
10/10/2024 10:19:29 AM
rw-r--r--
📄
navbar.php
1.63 KB
10/10/2024 10:19:29 AM
rw-r--r--
📁
new_folder
-
10/10/2024 10:19:37 AM
rwxr-xr-x
📄
new_index.php
10.18 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
new_table.php
13.36 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
postTest.php
3.43 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
sample_data.txt
7.07 KB
10/10/2024 10:19:30 AM
rw-r--r--
📄
share_facebook.php
2.01 KB
10/10/2024 10:19:30 AM
rw-r--r--
📄
sidebar.php
3.49 KB
10/10/2024 12:07:41 PM
rw-r--r--
📄
test.php
1.72 KB
10/10/2024 10:19:30 AM
rw-r--r--
📄
update_fb_pages.php
347 bytes
10/10/2024 10:19:30 AM
rw-r--r--
📁
vendor
-
10/10/2024 10:19:39 AM
rwxr-xr-x
Editing: share_facebook.php
Close
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); include 'function.php'; include 'db_connect.php'; include '../inc/validate.logged.php'; // $gUserId= 999; // Facebook App Credentials $credentials = json_decode(file_get_contents('credential.json'), true); $appId = $credentials['app_id']; $appSecret = $credentials['appSecret']; $redirectUri = 'https://knoblycream.com/testing/share_facebook.php'; // Ensure this URL matches the one registered with Facebook if (isset($_POST['page_token']) && $_POST['page_id']) { // Handle form submission to select a page $longLivedToken = facebook_generate_long_live_token($db, $_POST['page_id'], $_POST['page_token']); echo "<a href='https://knoblycream.com/testing/accessTest.php'> Test the permission</a><br>"; echo "<a href='https://knoblycream.com/testing/postTest.php?pageId=".$_POST['page_id']."'> Test Sending the Post to Facebook</a>"; } // Check if there's a code parameter in the query string else if (isset($_GET['code'])) { $shortLivedToken = facebook_generate_short_live_code($db, $credentials); echo 'Short-Lived Access Token: ' . $shortLivedToken . '<br>'; $pageTokens = facebook_generate_page_tokens($db, $shortLivedToken); // Display pages for selection echo "<form method='POST' action=''>"; echo "<h3>Select a page:</h3>"; foreach ($pageTokens as $index => $page) { echo "<input type='radio' name='page_token' value='" . htmlspecialchars($page['access_token']) . "' id='page" . ($index + 1) . "'>"; echo "<label for='page" . ($index + 1) . "'>" . htmlspecialchars($page['name']) . " (Page ID: " . htmlspecialchars($page['id']) . ")</label>"; // Add a hidden input for the page ID echo "<input type='hidden' name='page_id' value='" . htmlspecialchars($page['id']) . "'>"; echo "<br>"; } echo "<input type='submit' value='Select Page'>"; echo "</form>"; } else { echo 'No code parameter found.'; }