OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
facebook
/
backup
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
accessTest.php
1.06 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
credential.json
345 bytes
03/03/2025 08:20:43 AM
rw-r--r--
📄
facebook_callback.php
2.63 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
facebook_share.php
2.41 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
index.php
726 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
link_post.php
1.34 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
permissionTest.php
1.19 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
postTest.php
1.73 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
post_to_page.php
2.17 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
share_facebook.php
2.41 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
share_post.php
885 bytes
05/19/2025 10:07:15 AM
rw-r--r--
Editing: post_to_page.php
Close
<?php // Long-Lived Access Token // $longLivedToken = 'EAAGvb6fjh0YBO32eFQzgo93fTwfvZAJRs5iMCSbLDKB9cZCRmS29Gz1wiVUjrMoevJHkozCo02icx6WhxYrGYA9pktT3mVrUsKnfAMLZCHhQn5UhVYSC925PZA3dm2d8MiVb5DiHpXF04XmgUuwvFAmDZBPMhv5ZBIvtqs7IOrohHK5AWtIT2ozGBmZC2QEfC7y2DcAJwZDZD'; // $longLivedToken = "EAAGvb6fjh0YBO43g75nS06W5420ZC6ZBpUzRj6gme7MXRZCLbCUbN8rdxZAfprYJmDvxRaEM2okZCxjeYYvf3NMcZCg3ZC4CjjADe0LUhhLtWhb8ZBs6b4RBaGXC4yNNvenewR0XJ7uCb1ZAIIoQe8ZBBhwzJBKZBoWwp7OLHurTqzqZBteDWHLbMSYNXc5FvrajdA9zOXpnqxT1T1guMAZDZD"; The Working one!!!!!!! $credentials = json_decode(file_get_contents('credential.json'), true); $longLivedToken = $credentials['longLivedToken']; // Retrieve form data $pageId = $_POST['page_id']; $message = $_POST['message']; // URL to post content to the page $url = 'https://graph.facebook.com/v20.0/' . urlencode($pageId) . '/feed?message='. urlencode($message) . '&access_token=' . urlencode($longLivedToken); echo $url . "<br>"; echo "test url: curl -i -X POST \ \"https://graph.facebook.com/v20.0/379860695210422/feed?message=Hello%20Cream!!&access_token=EAAGvb6fjh0YBO43g75nS06W5420ZC6ZBpUzRj6gme7MXRZCLbCUbN8rdxZAfprYJmDvxRaEM2okZCxjeYYvf3NMcZCg3ZC4CjjADe0LUhhLtWhb8ZBs6b4RBaGXC4yNNvenewR0XJ7uCb1ZAIIoQe8ZBBhwzJBKZBoWwp7OLHurTqzqZBteDWHLbMSYNXc5FvrajdA9zOXpnqxT1T1guMAZDZD\""; // // Data to be sent // $data = [ // 'message' => $message, // 'access_token' => $longLivedToken // ]; // Initialize cURL $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); // curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Enable the option to return the header in the output curl_setopt($ch, CURLINFO_HEADER_OUT, true); // Execute the request $response = curl_exec($ch); // Print the final cURL command echo "<br><pre>"; echo "Final cURL Command:\n"; echo curl_getinfo($ch, CURLINFO_HEADER_OUT); echo "</pre><br>"; // Decode the response $result = json_decode($response, true); // Check if there was an error if (isset($result['error'])) { echo 'Error: ' . $result['error']['message']; } else { echo 'Post ID: ' . $result['id']; } ?>