OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
testing
/
new_folder
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
accessTest.php
601 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
composer-setup.php
57.04 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
composer.json
64 bytes
03/03/2025 08:25:24 AM
rw-r--r--
📄
composer.lock
2.81 KB
03/03/2025 08:25:24 AM
rw-r--r--
📄
composer.phar
2.86 MB
03/03/2025 08:25:25 AM
rw-r--r--
📄
configuration.txt
79 bytes
03/03/2025 08:25:24 AM
rw-r--r--
📄
credential.json
556 bytes
03/03/2025 08:25:25 AM
rw-r--r--
📄
function.php
7.44 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
370 bytes
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
1.24 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.61 KB
05/19/2025 10:07:13 AM
rw-r--r--
Editing: share_facebook.php
Close
<?php ini_set('display_startup_errors', 1); include 'function.php'; // 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'])) { // Handle form submission to select a page $longLivedToken = facebook_generate_long_live_token($_POST['page']); echo "<a href='https://knoblycream.com/testing/accessTest.php'> Test the permission</a><br>"; echo "<a href='https://knoblycream.com/testing/postTest.php?'> 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($credentials); echo 'Short-Lived Access Token: ' . $shortLivedToken . '<br>'; $longLivedTokens = facebook_generate_page_tokens($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' value='" . htmlspecialchars($page['access_token']) . "' id='page" . ($index + 1) . "'>"; echo "<label for='page" . ($index + 1) . "'>" . htmlspecialchars($page['name']) . " (Page ID: " . htmlspecialchars($page['id']) . ")</label><br>"; } echo "<input type='submit' value='Select Page'>"; echo "</form>"; } else { echo 'No code parameter found.'; }