WPに投稿した記事を自動でFBに投げてくれるPluginとして、Facebook Auto Publishがあるが、どハマったのでメモ
なお、無料で(Donateは可能)利用できるこの手のPluginで、2018/01時点のFB APIにOAuthレベルで完全に対応しているのはこれだけだった。 とてもありがたい。
ただし、もし、SettingのAuthorizeがうまくいかなくて、NGINXのlogに
NGINX Error log (URL is changed to example.jp) 2018/01/11 18:30:20 [error] 27732#100162: *40 FastCGI sent in stderr: "PHP message: PHP Warning: session_start(): Cannot start session when headers already sent in /usr/home/www/wordpress/wp-content/plugins/facebook-auto-publish/admin/authorization.php on line 9 PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/home/www/wordpress/wp-includes/formatting.php:5100) in /usr/home/www/wordpress/wp-content/plugins/facebook-auto-publish/admin/authorization.php on line 28 PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/home/www/wordpress/wp-includes/formatting.php:5100) in /usr/home/www/wordpress/wp-content/plugins/facebook-auto-publish/admin/authorization.php on line 34" while reading upstream, client: 10.2.101.41, server: example.jp, request: "POST /wp-admin/admin.php?page=facebook-auto-publish-settings HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "example.jp", referrer: "https://example.jp/wp-admin/admin.php?page=facebook-auto-publish-settings"
みたいなエラーが出ていたならば、以下のどちらかを行うこと
但し、自分のところでは、1ではだめだったので、2を行なった。 おそらく、一番最初の時だけ問題になると思われるので、PluginのUpdateには影響がないと信じて…
そのうち、詳細を書かないといかんなぁ。