-
Get a Facebook temp token at https://developers.facebook.com/tools/explorer/
-
Required permissions:
- To delete a user's post, a user access token with publish_actions permission is required.
- To delete a Page's post a Page access token and publish_pages permission is required.
- To delete a User's post on Page a Page access token is required.
-
Extend the Access Token at:
-
Add your group/page numeric ID. If you don't know the ID, use this service:
Get an API Key. See https://cloud.google.com/vision/docs/common/auth#set_up_an_api_key.
Make sure each module is working OK.
php FBUtil.php
php gVisionAPI.php "http://home.cse.ust.hk/~hunkim/images/Sungkim2.png"
You will see something like this:
Checking http://home.cse.ust.hk/~hunkim/images/Sungkim2.png
{
"responses": [
{
"safeSearchAnnotation": {
"adult": "VERY_UNLIKELY",
"spoof": "VERY_UNLIKELY",
"medical": "VERY_UNLIKELY",
"violence": "VERY_UNLIKELY"
}
}
]
}
- crontab Example (every 5 min):
*/5 * * * * cd /home/ubuntu/FacebookSpamOut/; php main.php
- You can run with group id.
php main.php 174499879257223
- Also you can set the time interval. Sync with your cron interval.
php main.php 174499879257223 "-5 minutes"
We always welcome your comments and PRs!