Title: Twitter issue
Last modified: September 15, 2017

---

# Twitter issue

 *  [garygomm](https://wordpress.org/support/users/garygomm/)
 * (@garygomm)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/twitter-issue-3/)
 * 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](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](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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftwitter-issue-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [anjalixyzscripts](https://wordpress.org/support/users/anjali94/)
 * (@anjali94)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/twitter-issue-3/#post-9501770)
 * 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/](https://xyzscripts.com/support/)
   so that we can check it for you.
 * Thank you.
 *  [tgould47](https://wordpress.org/support/users/tgould47/)
 * (@tgould47)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/twitter-issue-3/#post-9557013)
 * 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.
 *  [anjalixyzscripts](https://wordpress.org/support/users/anjali94/)
 * (@anjali94)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/twitter-issue-3/#post-9557711)
 * Hello tgould47,
 * This is not a common issue,so please send your wp login details to [https://xyzscripts.com/support/](https://xyzscripts.com/support/)
   for debugging.
    The plugin works fine in WP 4.8.2.
 *  [changwoo](https://wordpress.org/support/users/changwoo/)
 * (@changwoo)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/twitter-issue-3/#post-9781149)
 * 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 8 years, 4 months ago by [changwoo](https://wordpress.org/support/users/changwoo/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Twitter issue’ is closed to new replies.

 * ![](https://ps.w.org/social-media-auto-publish/assets/icon-128x128.png?rev=1790483)
 * [Social Media Auto Publish](https://wordpress.org/plugins/social-media-auto-publish/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/social-media-auto-publish/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/social-media-auto-publish/)
 * [Active Topics](https://wordpress.org/support/plugin/social-media-auto-publish/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social-media-auto-publish/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social-media-auto-publish/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [changwoo](https://wordpress.org/support/users/changwoo/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/twitter-issue-3/#post-9781149)
 * Status: not resolved