OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
testing
/
new_folder
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/10/2024 05:27:49 AM
rwxr-xr-x
📄
accessTest.php
657 bytes
10/07/2024 05:44:52 AM
rw-r--r--
📄
composer-setup.php
57.07 KB
10/07/2024 05:44:52 AM
rw-r--r--
📄
composer.json
64 bytes
10/07/2024 05:44:52 AM
rw-r--r--
📄
composer.lock
2.81 KB
10/07/2024 05:44:52 AM
rw-r--r--
📄
composer.phar
2.86 MB
10/07/2024 05:44:53 AM
rw-r--r--
📄
configuration.txt
79 bytes
10/07/2024 05:44:53 AM
rw-r--r--
📄
credential.json
556 bytes
10/07/2024 05:44:53 AM
rw-r--r--
📄
function.php
7.44 KB
10/07/2024 05:44:53 AM
rw-r--r--
📄
get_facebook_access_token.php
1.94 KB
10/07/2024 05:44:53 AM
rw-r--r--
📄
index.php
426 bytes
10/07/2024 05:44:53 AM
rw-r--r--
📄
permissionTest.php
1.31 KB
10/07/2024 05:44:53 AM
rw-r--r--
📄
postTest.php
1.29 KB
10/07/2024 05:44:53 AM
rw-r--r--
📄
post_to_page.php
2.29 KB
10/07/2024 05:44:53 AM
rw-r--r--
📄
share_facebook.php
1.66 KB
10/07/2024 05:44:53 AM
rw-r--r--
Editing: postTest.php
Close
<? ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); include 'function.php'; // Long-Lived Access Token // $longLivedToken = 'EAAGvb6fjh0YBO32eFQzgo93fTwfvZAJRs5iMCSbLDKB9cZCRmS29Gz1wiVUjrMoevJHkozCo02icx6WhxYrGYA9pktT3mVrUsKnfAMLZCHhQn5UhVYSC925PZA3dm2d8MiVb5DiHpXF04XmgUuwvFAmDZBPMhv5ZBIvtqs7IOrohHK5AWtIT2ozGBmZC2QEfC7y2DcAJwZDZD'; // Facebook App Credentials $credentials = json_decode(file_get_contents('credential.json'), true); $pageAccessToken = $credentials['longLivedToken']; // This should be the page access token // URL to post to the page $postUrl = 'https://graph.facebook.com/v16.0/me/feed'; // Check if form data is posted if (isset($_POST['message'])) { $message = $_POST['message']; if(isset($_POST['link'])){ $link = $_POST['link']; }else { $link = ''; } $response = facebook_post_to_page($message,$link); echo $response['message']; } else { // Display the form for posting a message ?> <form action="" method="POST"> <textarea name="message" placeholder="Write your message here..." required></textarea> <textarea name="link" placeholder="Enter the link to be shared..."></textarea> <button type="submit">Post</button> </form> <?php } ?>