OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
testing
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/04/2025 08:32:49 AM
rwxr-xr-x
📄
accessTest copy.php
601 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
accessTest.php
601 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📁
backup
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
composer-setup.php
57.04 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
composer.json
64 bytes
03/03/2025 08:18:54 AM
rw-r--r--
📄
composer.lock
2.81 KB
03/03/2025 08:18:54 AM
rw-r--r--
📄
composer.phar
2.86 MB
03/03/2025 08:18:55 AM
rw-r--r--
📄
configuration.txt
79 bytes
03/03/2025 08:18:55 AM
rw-r--r--
📁
cream
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
credential copy.json
556 bytes
03/03/2025 08:18:55 AM
rw-r--r--
📄
credential.json
556 bytes
03/03/2025 08:18:55 AM
rw-r--r--
📄
db_connect.php
341 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
function.php
18.87 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
get_facebook_access_token.php
1.94 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
index.php
420 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
navbar.php
1.63 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
new_folder
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
new_index.php
10.03 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
permissionTest.php
1.26 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
postTest.php
3.38 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
post_to_page.php
2.23 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
share_facebook.php
1.96 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
sidebar.php
3.08 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
update_fb_pages.php
347 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📁
vendor
-
05/19/2025 10:07:13 AM
rwxr-xr-x
Editing: share_facebook.php
Close
<?php ini_set('display_startup_errors', 1); 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>'; $longLivedTokens = facebook_generate_page_tokens($db, $shortLivedToken); // Display pages for selection echo "<form method='POST' action=''>"; echo "<h3>Select a page:</h3>"; foreach ($longLivedTokens 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.'; }