• When posting to twitter and Facebook, the Facebook post works but the twitter does not. After clicking publish the wordpress post page just goes to a white screen. The Facebook post is made, but nothing is posted to twitter. There is no entry in the Social Media Logs. I’ve deleted the twitter app and recreated as well. I have narrowed down the issue to the Featured Image. If I remove the featured image the posts to twitter works. I’ve tried change the size of the image per the FAQs but nothing I do allows it to work when there is a Featured Image. I am getting these two warnings in the server logs when it does not work;

    2017-09-15 21:33:36 Warning 109.153.27.167 mod_fcgid: stderr: PHP Warning: strpos() expects parameter 1 to be string, object given in /var/www/vhosts/stockwoodparkrfc.co.uk/httpdocs/wp-content/plugins/social-media-auto-publish/api/twitteroauth.php on line 301, referer: https://stockwoodparkrfc.co.uk/wp-admin/post.php?post=4521&action=edit Apache error
    2017-09-15 21:33:36 Warning 109.153.27.167 mod_fcgid: stderr: PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /var/www/vhosts/stockwoodparkrfc.co.uk/httpdocs/wp-content/plugins/social-media-auto-publish/api/twitteroauth.php on line 370, referer: https://stockwoodparkrfc.co.uk/wp-admin/post.php?post=4521&action=edit

    Any ideas or pointer to the issue?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello garygomm ,

    Hope you are using the latest version of Social Media Auto Publish, if not then try again with the latest version.
    If it doesn’t work,then you can send your wp login details to https://xyzscripts.com/support/
    so that we can check it for you.

    Thank you.

    Exact same problem (same error, same lines) for months with older and current (v1.7.4)

    Running WP 4.8.2 using X Theme. Happens every single posting.

    Hello tgould47,

    This is not a common issue,so please send your wp login details to https://xyzscripts.com/support/ for debugging.
    The plugin works fine in WP 4.8.2.

    Sorry for my poor english, in advance.
    The error might be related to your server’s certification setting.

    Warning: strpos() expects parameter 1 to be string, object given in /wordpress/time/public_html/wp-content/plugins/sns-auto-publish/api/twitteroauth.php on line 301
    Catchable fatal error: Object of class WP_Error could not be converted to string in /wordpress/time/public_html/wp-content/plugins/sns-auto-publish/api/twitteroauth.php on line 370
    348 error_log("\n\nlog by ivynet: \n\n" . print_r( $params, true ) );
    349     // encode params unless we're doing multipart
    350     foreach ($params as $k => $v) {
    351       $k = $this->request_settings['multipart'] ? $k : $this->safe_encode($k);
    352 
    353       if (is_array($v))
    354         $v = implode(',', $v);
    355 
    356       $v = $this->request_settings['multipart'] ? $this->multipart_escape($v) : $this->safe_encode($v);
    357 
    358       // split parameters for the basestring and authorization header, and recreate the oauth1 array
    359       if ($doing_oauth1) {
    360         // if we're doing multipart, only store the oauth_* params, ignore the users request params
    361         if ((strpos($k, 'oauth') === 0) || !$this->request_settings['multipart'])
    362           $prepared_pairs_with_oauth[] = "{$k}={$v}";
    363 
    364         if (strpos($k, 'oauth') === 0) {
    365           $oauth1[$k] = $v;
    366           continue;
    367         }
    368       }
    369       $prepared[$k] = $v;
    370       $prepared_pairs[] = "{$k}={$v}";
    371     }

    dumped $params:

    Array
    (
        [media[]] => WP_Error Object
            (
                [errors] => Array
                    (
                        [http_request_failed] => Array
                            (
                                [0] => cURL error 28: Connection timed out after 5000 milliseconds
                            )
    
                    )
    
                [error_data] => Array
                    (
                    )
    
            )
    
        [oauth_consumer_key]        => ...
        [oauth_nonce]               => ...
        [oauth_signature_method]    => HMAC-SHA1
        [oauth_timestamp]           => ...
        [oauth_token]               => ...
        [oauth_version]             => 1.0
        [status]                    => ...
    

    I’ve dumped the log and I think the error is caused by a connection error, which is deeply related to your server.

    • This reply was modified 6 years, 11 months ago by changwoo.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twitter issue’ is closed to new replies.