Title: Twitter problem
Last modified: August 22, 2016

---

# Twitter problem

 *  Resolved [Gary](https://wordpress.org/support/users/zulu11/)
 * (@zulu11)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/twitter-problem-7/)
 * Hello, thanks for a great plugin. I have noticed a problem and was wondering 
   if anyone can help. When WordPress auto posts to my twitter account the short
   link generated will not work and gives this error message – Warning: Cannot modify
   header information – headers already sent by (output started at public_html/websites/
   wp-content/plugins/add-headers/add-headers.php:302) in public_html/websites/wp-
   includes/pluggable.php on line 1179
 * I have de-activated the plugin and the link now works? Thanks in advance.
 * [https://wordpress.org/plugins/add-headers/](https://wordpress.org/plugins/add-headers/)

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

 *  Plugin Author [George Notaras](https://wordpress.org/support/users/gnotaras/)
 * (@gnotaras)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/twitter-problem-7/#post-5581799)
 * Thanks for your feedback. This possibly happens because of the workaround that
   is used in order to add the extra headers (WP did not have an officially supported
   method at the time of writing the plugin). I’ll investigate this issue soon and
   probably improve the way those headers are added.
 * Please stay tuned. I’ll need your feedback.
 *  Plugin Author [George Notaras](https://wordpress.org/support/users/gnotaras/)
 * (@gnotaras)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/twitter-problem-7/#post-5581801)
 * Unfortunately at the time of writing it is impossible to find an alternative 
   way to implement this plugin while maintaining the current functionality. It 
   is limited by WP itself.
 * One question: By ‘shortlink’ you mean the `http://example.org/?p=NNN` link? They
   work fine in a test blog.
 * Possibly another plugin uses the same workaround to send HTTP headers and there
   might be a conflict.
 * Could you comment out [line 302](https://bitbucket.org/gnotaras/wordpress-add-headers/src/acc2f61b4e1a50be5e49ae392ebd41bcdae50a27/add-headers.php?at=default#cl-302)
   of add-headers.php and try it again?
 *  Plugin Author [George Notaras](https://wordpress.org/support/users/gnotaras/)
 * (@gnotaras)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/twitter-problem-7/#post-5581805)
 * I’ve done some research about this. Another thing you could try is to replace
   line 305:
 *     ```
       add_action('wp', 'addh_flush_ob_end');
       ```
   
 * with:
 *     ```
       add_action('wp_footer', 'addh_flush_ob_end');
       ```
   
 * And try again to auto post to twitter.
 * It seems that WP tries to send a `Location` header after the headers have been
   sent. Please try the above workaround.
 * Looking forward to your feedback.
 *  Plugin Author [George Notaras](https://wordpress.org/support/users/gnotaras/)
 * (@gnotaras)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/twitter-problem-7/#post-5581806)
 * Version 1.1.0 includes the modification I mentioned in post #4.
 * Please try 1.1.0 without modifications and if possible provide some feedback 
   about this.
 *  Thread Starter [Gary](https://wordpress.org/support/users/zulu11/)
 * (@zulu11)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/twitter-problem-7/#post-5581811)
 * Hi George, Apologies for my delayed reply! I have updated your plugin and it 
   all seems to be working perfectly. Thank you for your fantastic support! I will
   be giving you 5 stars in my review.
 *  Plugin Author [George Notaras](https://wordpress.org/support/users/gnotaras/)
 * (@gnotaras)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/twitter-problem-7/#post-5581815)
 * Hello Zulu11, thanks for letting me know that it works and also thanks for the
   review.

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/add-headers.svg)
 * [Add Headers](https://wordpress.org/plugins/add-headers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/add-headers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/add-headers/)
 * [Active Topics](https://wordpress.org/support/plugin/add-headers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/add-headers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/add-headers/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [George Notaras](https://wordpress.org/support/users/gnotaras/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/twitter-problem-7/#post-5581815)
 * Status: resolved