### Start WhatsApp Server
Source: https://stackposts.com/docs/stackposts-v9/install-whatsapp-server
Use this command to start the WhatsApp Server. For production environments, it is recommended to use PM2 for process management to ensure the server runs continuously.
```bash
node app.js
```
```bash
pm2 start app.js -i max
```
--------------------------------
### Install Node.js Dependencies
Source: https://stackposts.com/docs/stackposts-v9/install-whatsapp-server
Navigate to the whatsapp-server directory in your terminal and run this command to install all necessary Node.js packages.
```bash
cd whatsapp-server
npm install
```
--------------------------------
### Test API Call for pages_show_list
Source: https://stackposts.com/docs/stackposts-v9/facebook-api-official-15592
This is an example GET request to the /me/accounts endpoint, used to test the 'pages_show_list' permission. Ensure you have successfully made this call before requesting advanced access.
```http
GET /me/accounts
```
--------------------------------
### Nginx Configuration for Stackposts Installer and Laravel App
Source: https://stackposts.com/docs/stackposts-v9/installation
Configure your Nginx server to handle requests for the Stackposts installer and the main Laravel application. Remember to restart Nginx after saving the configuration.
```nginx
# Installer
location /installer {
try_files $uri $uri/ /installer/index.php?$args;
}
# Laravel
location / {
try_files $uri $uri/ /public/index.php?$args;
}
```
--------------------------------
### Example Instagram Permissions String
Source: https://stackposts.com/docs/stackposts-v9/instagram-analytics-15902
This string represents a list of permissions to be added to the Instagram Permissions field in Stackposts' API Integration settings. Ensure 'instagram_manage_insights' is included for analytics.
```text
instagram_basic,instagram_content_publish,pages_show_list,business_management,instagram_manage_insights
```
--------------------------------
### Test API Call for pages_manage_posts
Source: https://stackposts.com/docs/stackposts-v9/facebook-api-official-15592
This is an example POST request to the /{page-id}/feed endpoint, used to test the 'pages_manage_posts' permission. Ensure you have successfully made this call before requesting advanced access.
```http
POST /{page-id}/feed
```
--------------------------------
### Create PHP Info File for Verification
Source: https://stackposts.com/docs/stackposts-v9/fix-503-service-unavailable-when-uploading-in-stackposts-aapanel-ezd-plus-apache-ezd-plus-php-8-x-15908
Create a simple PHP file to verify that the PHP configuration changes, including upload limits and execution times, have been applied correctly. Access this file via a web browser to check the 'phpinfo()' output.
```php
```
--------------------------------
### Google Analytics Tracking Script
Source: https://stackposts.com/docs/stackposts-v9/embed-code-15838
Example of a Google Analytics tracking script to be embedded. Ensure the ID is correctly configured.
```html
```
--------------------------------
### AI Publishing Cron Job (Artisan Command)
Source: https://stackposts.com/docs/stackposts-v9/crons
Execute AI publishing tasks using the Artisan command. This method requires direct access to your project's command-line interface.
```bash
* * * * * php /path-to-your-project/artisan appaipublishing:cron >/dev/null 2>&1
```
--------------------------------
### AI Publishing Cron Job (URL Method)
Source: https://stackposts.com/docs/stackposts-v9/crons
Use this command with your server's cron utility to trigger AI publishing tasks via URL. Ensure the SECURE_KEY is updated.
```bash
* * * * * curl -fsS "https://yourdomain.com/app/ai-publishing/cron?key=SECURE_KEY" >/dev/null 2>&1
```