Extension talk:SendToTwitter2

for configuration help or consulting, feel free to contact me at http://www.wikiexpert.com/contact

--Phalseid 19:24, 8 December 2009 (UTC)

I needed to change this line in the LocalSettings:

$wgSendToTwitterWikiURL      = 'http://www.yourdomain.com/wiki/'; #don't forget trailing slash!

to this

$wgSendToTwitterWikiURL      = 'http://www.yourdomain.com/wiki/index.php?title=';

in order for this extension to work.

--LCaruana 18:25, 9 February 2010 (UTC)


 * probably depends if you are using prettyurls or not --Phalseid 17:58, 18 February 2010 (UTC)

Same Error As "SendToTwitter"
PHP Fatal error: Call to undefined function curl_init in /var/www/htdocs/extensions/SendToTwitter2/SendToTwitter2.php on line 65

Any ideas? Thanks --John Thomson 02:57, 2 March 2010 (UTC)
 * You likely don't have CURL enabled on your webspace --Frantik 15:54, 3 March 2010 (UTC)


 * Hi Frantik - That did it! Bit of a "doh" moment there.  Thanks very much, I appreciate your help!! --John Thomson 23:27, 3 March 2010 (UTC)

Send to Twitter and Captcha allows TwitterSpam
I enabled SendToTwitter2 this evening, and within minutes I received a tweet where the summary was "Accutane", it was promptly followed by a similar tweet. Seeing nothing in my RecentChanges, I tried the following:


 * 1) I logged out of my wiki
 * 2) I attempted to edit a page and added a comment
 * 3) I was prompted to enter my captchas, but by that point, STT2 had already fired, and the tweet was sent.

Relevant captcha config:

// Fix the default captcha behaviour $wgGroupPermissions['*'           ]['skipcaptcha'] = false; $wgGroupPermissions['user'        ]['skipcaptcha'] = true; $wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true; $wgGroupPermissions['bot'         ]['skipcaptcha'] = true; // registered bots $wgGroupPermissions['sysop'       ]['skipcaptcha'] = true; # $wgCaptchaTriggers['edit']         = true; $wgCaptchaTriggers['create']       = true; $wgCaptchaTriggers['createaccount'] = true;

For the time being, I disabled captcha and disabled anonymous edits altogether. It's not an important feature for me anyways. --John Thomson 23:35, 3 March 2010 (UTC)
 * Hi John, try this solution which is mentioned on the original SendToTwitter page: Extension:SendToTwitter and let me know if it solves your problem.  I'm not using a captcha on my site so I'm not sure. --Frantik 18:11, 6 March 2010 (UTC)

Hide to anonymous users & YOURLS integration
This is a great tool for my wiki. If anyone is interested, I added a few modifications. First, if you want to hide the SendToTwitter checkbox to anonymous users (which I highly recommend!) you can just change these two lines (around 111 or so) from this: to this:

Next, if you have a YOURLS installation for custom short links, you can replace the line that queries the URL shortener's API (around line 67 or so) from this: to this (replace the stuff in caps to your own info):

And that's it! I hope that may be helpful to someone. I've recently started using Ping.fm to send certain updates to multiple social networks simultaneously, and it should be pretty simple to modify this extension to send to Ping.fm instead of Twitter. If I end up making those modifications, I'll post an example here. —Pensapedia 15:35, 19 March 2010 (UTC)
 * for even finer control..


 * then you can specify who can tweet

$wgGroupPermissions['*']['canTweet'] = false;         // anon not allowed to tweet $wgGroupPermissions['user']['canTweet'] = false;      // users can't tweet either $wgGroupPermissions['myCoolGroup']['canTweet'] = true; // myCoolGroup users can tweet $wgGroupPermissions['sysop']['canTweet'] = true;      // admins  can tweet


 * i will add this in the next release --Frantik 12:11, 20 March 2010 (UTC)

Problem with the extension
Copied the settings to Localsettings.php, and everything is default except for username & password. I get the following error message when I try to save a page that after editing it.

Detected bug in an extension! Hook efSendToTwitter2Save failed to return a value; should return true to continue hook processing or false to abort.
 * I'm not sure what then problem is since the function does indeed return a value. Any other error messages? --Frantik 15:02, 14 August 2010 (UTC)

I saw the same type of error, failed to return a value, on the ConfirmAccount extension and the solution there was to upgrade it to the version that is for my Mediwiki installation version. I currently run 1.16.0 of Mediawiki and this extension is for 1.14+ so I guess that its not the problem.

Help with new OAuth
I've recieved this in a mail from Twitter: >> Starting August 31, all applications will be required to use “OAuth” to access your Twitter account. So the extension is not working anymore. What to do? Erwin van der Ploeg 10:52, 6 September 2010 (UTC)
 * Yeah i thought it was supposed to be sooner actually. Unfortunately, I don't have a lot of use for this extension; someone paid me to make the first set of changes from the original. If someone wants to contract me to update it for OAuth, it is more likely to be working quickly.  Otherwise it will have to wait until I have some free time and interest in fixing it.  If someone can give an example on how to do the OAuth stuff it would make it a lot easier to implement.  --Frantik 11:23, 6 September 2010 (UTC)

I was very pleased with the extension, so too bad it isn't working anymore. I'm not a developer, so i can rewrite your code. I did find some PHP code what can do the authenticating trick. Maybe you can integrate is? http://github.com/abraham/twitteroauth Erwin van der Ploeg 07:07, 7 September 2010 (UTC)
 * that twitteroauth code will help a lot, thanks --Frantik 08:18, 7 September 2010 (UTC)