OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
testing
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/07/2024 05:44:48 AM
rw-r--r--
📄
accessTest.php
657 bytes
10/08/2024 07:28:15 AM
rw-r--r--
📁
backup
-
10/07/2024 05:44:52 AM
rwxr-xr-x
📄
composer-setup.php
57.07 KB
10/07/2024 05:44:51 AM
rwxr-xr-x
📄
composer.json
64 bytes
10/07/2024 05:44:51 AM
rw-r--r--
📄
composer.lock
2.81 KB
10/07/2024 05:44:51 AM
rw-r--r--
📄
composer.phar
2.86 MB
10/07/2024 05:44:52 AM
rwxr-xr-x
📄
configuration.txt
79 bytes
10/07/2024 05:44:51 AM
rw-r--r--
📁
cream
-
10/07/2024 05:39:15 AM
rwxr-xr-x
📄
credential copy.json
556 bytes
10/07/2024 05:44:51 AM
rw-r--r--
📄
credential.json
556 bytes
10/07/2024 05:44:51 AM
rw-rw-rw-
📄
db_connect.php
341 bytes
10/07/2024 05:44:51 AM
rw-r--r--
📄
function.php
18.87 KB
10/10/2024 09:04:44 AM
rw-r--r--
📄
get_facebook_access_token.php
1.94 KB
09/04/2024 05:58:04 AM
rw-r--r--
📄
index.php
476 bytes
10/08/2024 07:28:06 AM
rw-r--r--
📄
navbar.php
1.63 KB
10/07/2024 11:24:58 AM
rw-r--r--
📁
new_folder
-
10/07/2024 05:44:53 AM
rwxr-xr-x
📄
new_index.php
10.08 KB
10/10/2024 08:40:32 AM
rw-r--r--
📄
permissionTest.php
1.31 KB
09/04/2024 05:58:04 AM
rw-r--r--
📄
postTest.php
3.43 KB
10/08/2024 07:28:28 AM
rw-r--r--
📄
post_to_page.php
2.29 KB
09/04/2024 05:58:04 AM
rw-r--r--
📄
share_facebook.php
2.02 KB
10/08/2024 07:28:28 AM
rw-r--r--
📄
sidebar.php
3.08 KB
10/07/2024 11:28:08 AM
rw-r--r--
📄
update_fb_pages.php
347 bytes
10/10/2024 09:05:33 AM
rw-r--r--
📁
vendor
-
07/20/2024 07:09:34 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>'; $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.'; }