Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Suki on April 20, 2011, 01:43:22 PM

Title: SimpleTwitter
Post by: Suki on April 20, 2011, 01:43:22 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2982)

Simple Twitter mod
Author: Suki (http://missallsunday.com)


License

* This SMF modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/


Description

For SMF 2.0.x only

This mod uses TwitterOAuth PHP Library  by Abraham Williams (abraham[at]abrah.am) http://abrah.am

This mod needs PHP 5.2+ and cURL Library

This mod allow you to publish new topics to your twitter account automatically, all the topics made by users who have an active account will be automatically published on your twitter account.

the message will be as follows:

topic name url
url will be normal url or if enable, bit.ly url


-Set the ID of the board or boards you don't want the mod work.
-Permisisons to post new topics to twitter
-You can use the bit.ly API  to short your urls
-works with every theme, this mod des not modify any file at all! ;)

   you will have to create a twitter app, without the twitter app, this mod will not work.


Laguage
-English/utf8
-Spanish_latin/utf8
-Spanish_es/utf8


Change Log
-5/Jan/12 1.2
   +Compatible with 2.0.x
   +fixed bug on users_denied and boards array
   +Updated twitter library
   +Disable the admin form via JavaScript if cURL is not installed

-23/June/11  1.1. version.
   +Added a permission, now you can manage which membergroups can post new topics to twitter
   +Added a single user ban, now you can put the IDs of single users, those users will not be able to post new topics to twitter even if they are on a group with permissions.
   +Updated to SMF 2.0
   +Cleaning up the Settings part
   +Updated the twitter API
   +Re-work of language strings
   
-10/March/11  Finished first version.
Title: Re: SimpleTwitter
Post by: TheListener on April 20, 2011, 02:26:25 PM
Hey MAS

Daft question but any images on what users should expect to see?

Do members also have to own a twitter account to have their posts tweeted? ( confused with the description slightly).
Title: Re: SimpleTwitter
Post by: Suki on April 20, 2011, 02:36:27 PM
No, the users do not have to have a twitter account,   this mod will post every new topic you specify in a twitter account you specify, many forums and site has a twitter account for forum/site purposes.

you wil need to create a twitter app for your twitter account where you wish to publish the topics in,  there's instruction on the mod's settings if you click the little help icon, to create a new twitter app follow this steps:


In order to use this mod, you have to create an app on twitter, first, go to: Client Applications page (https://dev.twitter.com/apps), sign in with your twitter username and password, click on Register a new application, fill out all the requested fields:
-Application Name: this is important, whatever you put in here will appear on every tweet: via:myforum_name
-Application URL: your forum url
-Application Type: check the "Client" option
- Default Access type: check the "Read & Write" option
- Application Icon: the icon for the app, can be edited later.

once you register your app, now you can see your Consumer key and Consumer secret.

to get your token access, clik on "My acces Token" tab. you will get your auth token and oauth token secret do not reveal those.


The topic will not be posted in he user's account but rather in the account where you made the app.
Title: Re: SimpleTwitter
Post by: TheListener on April 20, 2011, 02:38:11 PM
Thanks for the eye opener MAS.

Title: Re: SimpleTwitter
Post by: Matthew K. on April 20, 2011, 02:57:19 PM
Nice to see this approved finally, Miss All Sunday :) Congratulations!
Title: Re: SimpleTwitter
Post by: Suki on April 20, 2011, 03:05:24 PM
Thanks!

hope this mod will be useful
Title: Re: SimpleTwitter
Post by: Soulmaster on April 22, 2011, 12:00:08 AM
is it possible to make it so that also the reactions are posted?
Title: Re: SimpleTwitter
Post by: vladok on April 24, 2011, 07:16:35 AM
Mod for UTF8 boards only?
Title: Re: SimpleTwitter
Post by: Suki on April 24, 2011, 04:33:52 PM
Quote from: Soulmaster on April 22, 2011, 12:00:08 AM
is it possible to make it so that also the reactions are posted?

by reactions yo mean replies?

well, I don't think posting the replies also is a good idea if you have a big or a pretty busy forum, there's also a limit set by twitter for their API.


Quote from: vladok on April 24, 2011, 07:16:35 AM
Mod for UTF8 boards only?


What language are you using?   can you post a link to your site, maybe an example of how this mod creates the tweet in your language?
Title: Re: SimpleTwitter
Post by: vladok on April 25, 2011, 03:22:44 AM
I use charset windows-1251 / Russian /
Posts to Twitter (via this mod) looks like (example)  : ? ? ? ? ? ? ? ?  ? ? ? ? The Sims 3 ? ? ? ?
When you create posts to Twitter from my forum via RSS (twitterfeed.com), russian looks normal.
Title: Re: SimpleTwitter
Post by: Suki on April 26, 2011, 10:44:28 AM
OK, let me do some test today to see whats the issue with non utf8 languages, to be quite honest, I only tested it with English and Spanish.
Title: Re: SimpleTwitter
Post by: 4b11l on May 01, 2011, 02:15:35 AM
Hello Miss All Sunday,

Although it was explained above I am still slightly confused as to the description. Is this similar to the twitter/facebook publisher mod in the past if you've come across from it? Basically all new posts on your forum are posted on an account specified for the website. i.e. all new threads on this site will post to a simplemachines twitter account.

If so, are there permissions for threads that are created in hidden/unavailable boards? such as boards only for admin/mods.
Title: Re: SimpleTwitter
Post by: Suki on May 01, 2011, 07:26:12 PM
Yes, its exactly as you pointed out.


if you have hidden boards or boards do you not want to publish to twitter  there's a check option:

Check to define the boards where this mod will not work
optional, leave in blank to post tweets from every board, this is useful if you have admin only or members only type of boards and you do not want to make the topics go public.


check that option and below:

Put the board's ID where yo DO NOT want this mod to work.
IDs only, example: 1,2,3,4




for example if you have a hidden board with ID  3  then you put   3  in that field,  if you have more  separate every number with a comma ( , )    3,67,788,2,4,5
Title: Re: SimpleTwitter
Post by: 4b11l on May 01, 2011, 08:42:44 PM
That is exactly what I wanted to hear. Wanted this feature back so badly since the other one stopped.

Usually, I can modify to fit but this one is not installing in RC3. (I know you say rc4 and 5 only)

I am getting this error:
Fatal error: Call to undefined function add_integration_function() in /home/xpeng065/public_html/Packages/temp/install.php on line 19

Can you let me know if this is a RC3 only issue or is it because I am missing cURL or PHP5.2+ if possible? Thanks that will help me narrow it down as I really want this mod to work.
Title: Re: SimpleTwitter
Post by: Arantor on May 01, 2011, 08:53:04 PM
-sigh-

It is RC4 and RC5 only for a REASON. Like the fact that add_integration_function didn't exist until RC4.
Title: Re: SimpleTwitter
Post by: 4b11l on May 01, 2011, 09:04:46 PM
Quote from: Once Upon A Star on May 01, 2011, 08:53:04 PM
-sigh-

It is RC4 and RC5 only for a REASON. Like the fact that add_integration_function didn't exist until RC4.

Thanks for the info by the way. That's why I ASKED. Not everyone is a genius like you at stuff like this, go save the world or something if it's that troublesome for you provide helpful info.
Title: Re: SimpleTwitter
Post by: ~DS~ on May 01, 2011, 09:08:38 PM
Quote from: 4b11l on May 01, 2011, 09:04:46 PM
Quote from: Once Upon A Star on May 01, 2011, 08:53:04 PM
-sigh-

It is RC4 and RC5 only for a REASON. Like the fact that add_integration_function didn't exist until RC4.

Thanks for the info by the way. That's why I ASKED. Not everyone is a genius like you at stuff like this, go save the world or something if it's that troublesome for you provide helpful info.
It's people like you who couldn't read when this mod in fact is NOT compatible with RC3, you have no choice but to upgrade if you want to use this mod's function.
Title: Re: SimpleTwitter
Post by: Suki on May 01, 2011, 09:13:26 PM
4b11l  I'm afraid this mod is only compatible with RC4 and RC5, this is because this mod needs some features that are only available in those versions.


also, I will highly appreciate  if you do not use this topic for other purposes but for support for the mod only.

thank you.
Title: Re: SimpleTwitter
Post by: 4b11l on May 01, 2011, 09:23:53 PM
Quote from: ~V~ on May 01, 2011, 09:08:38 PM
Quote from: 4b11l on May 01, 2011, 09:04:46 PM
Quote from: Once Upon A Star on May 01, 2011, 08:53:04 PM
-sigh-

It is RC4 and RC5 only for a REASON. Like the fact that add_integration_function didn't exist until RC4.

Thanks for the info by the way. That's why I ASKED. Not everyone is a genius like you at stuff like this, go save the world or something if it's that troublesome for you provide helpful info.
It's people like you who couldn't read when this mod in fact is NOT compatible with RC3, you have no choice but to upgrade if you want to use this mod's function.

Hello Miss All Sunday,

Thanks to the info provided by Once Upon A Star I know why now. I was simply asking for support and did not know why I received a response the way I did so I had to defend my response. Is that not what support is?

@V, it's funny people like me or rather people like you exists to throw tantrums on the internet.

I acknowledged that I knew it wasn't compatible for RC3 and usually slight modifications will make mods fit previous or other versions of SMF. I didn't knew what the reason was and simply asked to help me narrow the problem.

Either way, thanks for the great mod Miss All Sunday. Hopefully I will be able to use it in the future and as for the issue, I feel no need to pursue it any further like kids arguing over the internet.
Title: Re: SimpleTwitter
Post by: Suki on May 02, 2011, 11:38:34 AM
meh :(   I meant  you   as in plural,  (you guys)    In Spanish we have two separate words,  "tu"  for a single person  and "ustedes"  for plural.
Title: Re: SimpleTwitter
Post by: HaCCaBi on May 07, 2011, 08:16:51 PM
hey,

how about non-utf8 languages
mine is "latin5 turkish"

what we should do_?
Title: Re: SimpleTwitter
Post by: HaCCaBi on May 07, 2011, 09:28:49 PM
solved...

Sources/SimpleTwitter.php

replace line 49:
$twt_message = iconv("ISO-8859-9","UTF-8",$msgOptions['subject']);
this is for turkish..  for other languages you need to change the ISO-8859-9 to your character set 


replace line 90:
$twitter=$connection->post('statuses/update', array('status' =>$mensaje));



Title: Re: SimpleTwitter
Post by: vladok on May 08, 2011, 06:20:02 PM
HaCCaBi, Thank you! It works!  :)

***

Russian:

$txt['ST_donate'] = 'Если Вам нравится этот мод, <a href="http://oharascans.com/donate.html" target="blank">поддержите его развитие!</a>';
$txt['simpletwitter_default_menu'] = 'Мод SimpleTwitter';
$txt['simple_twitter_post_body'] = '<span style="font-weight:bold;">Постить часть сообщения?</span><br />При включенной опции, будут публиковаться первые 80 знаков сообщения, только текст, bbc теги будут удаляться, в конце сообщения будет "..." т.е. многоточие.';
$txt['simple_twitter_enable'] = '<span style="font-weight:bold;">Включить SimpleTwitter мод</span><br />Кликните на значке помощи, чтобы узнать, как зарегистировать свою аппликацию на twitter.';
$txt['simple_twitter_use_bitly'] = '<span style="font-weight:bold;">Использовать сервис bit.ly API для укорачивания стандартной ссылки?</span><br />Кликните на значке помощи, чтобы узнать, как получить username и  key на bit.ly<br/>Это опционально, в противном случае будет публиковаться не укороченная ссылка, занимающая больше места.';
$txt['simple_twitter_bit_ly_username'] = '<span style="font-weight:bold;">Введите bit.ly username здесь:</span><br />Это опционально, но если Вы включили сервис bit.ly и не ввели username, ссылка не будет укорачиваться.';
$txt['simple_twitter_bit_ly_key'] = '<span style="font-weight:bold;">Введите bit.ly key здесь:</span><br />но если Вы включили сервис bit.ly и не ввели key, ссылка не будет укорачиваться.';
$txt['simple_twitter_boards'] = '<span style="font-weight:bold;">Введите ID разделов форума, которые этот мод НЕ будет обслуживать.</span><br />Только ID разделов, например: 1,2,3,4';
$txt['simple_twitter_consumer_key'] = '<span style="font-weight:bold;">Введите twitter consumer key здесь:</span><br />Вы должны сделать это после регистрации апликации на twitter.';
$txt['simple_twitter_consumer_secret'] = '<span style="font-weight:bold;">Введите twitter consumer secret здесь:</span><br />Вы должны сделать это после регистрации апликации на twitter.';
$txt['simple_twitter_oauth_token'] = '<span style="font-weight:bold;">Введите oauth token здесь:</span><br />Вы должны сделать это после регистрации апликации на twitter.';
$txt['simple_twitter_oauth_token_secret'] = '<span style="font-weight:bold;">Введите oauth token secret здесь:</span><br />Вы должны сделать это после регистрации апликации на twitter.';
$txt['simple_twitter_board_enable'] = '<span style="font-weight:bold;">Определите разделы форума, которые <span style="font-weight:bold; color:red; font-size:14;">НЕ будут обслуживаться модом</span></span><br />Опционально, оставьте пустым для постинга из всех разделов. Включение этой опции полезно, если у Вас есть скрытые от гостей разделы, и Вы не хотите, чтобы из них публиковались сообщения в twitter.';

// help strings
$helptxt['simple_twitter_enable'] = 'Более детально можно узнать <a href="http://oharascans.com/foro/tutoriales/tutcreate_twitter_app_simpletwitter_mod_2786.msg9714.html#msg9714" target="blank">здесь</a><p />Для работы этого мода Вы должны создать свою аппликацию на twitter. Перейдите <a href="http://dev.twitter.com/apps" target="blank">на страницу Client Applications</a>, залогиньтесь,  нажмите Register a new application, и заполните поля: <br />
-Application Name:  это важно, будет публиковаться в поле:  via:здесь_имя_аппликации<br />
-Application URL:  линк на Ваш форум<br />
-Application Type:  включите "Client" опцию<br/>
- Default Access type:  включите "Read & Write" опцию <br/>
- Application Icon: значок аппликации, может быть отредактирован впоследствии.<br/>
<p /> после регистрации Вы увидите Consumer key и Consumer secret. <p />Для получения token access, кликните "My acces Token"  закладку. Получите oauth token и oauth token secret.';
$helptxt['simple_twitter_use_bitly'] = 'Для использования сервиса bit.ly, Вы должны зарегистрировать аккаунт на <a href="http://bit.ly/" target="blank">bit.ly</a>  и запросить: <a href="http://bit.ly/a/your_api_key" target="blank">Ваш API key</a>. Получив Ваши username и key сервиса, заполните соотвествующие поля мода.';
Title: Re: SimpleTwitter
Post by: madfitz on May 28, 2011, 03:55:38 PM
Is there any way to add hashtags to the tweet? For example, if your board is dedicated to certain sports team you could include #teamname to every tweet?
Title: Re: SimpleTwitter
Post by: Suki on May 28, 2011, 05:23:18 PM
can you please elaborate more?  you want to include  #something in the tweet?
Title: Re: SimpleTwitter
Post by: madfitz on May 28, 2011, 05:39:12 PM
Quote from: Miss All Sunday on May 28, 2011, 05:23:18 PM
you want to include  #something in the tweet?

Yes, exactly. And I'm happy to have the same #something in every tweet.
Title: Re: SimpleTwitter
Post by: Suki on May 28, 2011, 05:45:23 PM
open your Sources/SimpleTwitter.php file  and find:

$mensaje = $twt_message.'  '.$twturl;


there you can add your #somthing   by replacing with this




$thing_to_show = '#something';
$mensaje = $twt_message.'  '.$twturl. ' .$thing_to_show;



this will show # at the end of the tweet after the url
Title: Re: SimpleTwitter
Post by: madfitz on May 29, 2011, 09:46:30 AM
Quote from: Miss All Sunday on May 28, 2011, 05:45:23 PM
open your Sources/SimpleTwitter.php file  and find:

$mensaje = $twt_message.'  '.$twturl;


there you can add your #somthing   by replacing with this




$thing_to_show = '#something';
$mensaje = $twt_message.'  '.$twturl. ' .$thing_to_show;



this will show # at the end of the tweet after the url

Thank you but this edit results in the error:
Parse error: syntax error, unexpected T_STRING in /home/.../forum/Sources/SimpleTwitter.php on line 79
Title: Re: SimpleTwitter
Post by: Suki on May 29, 2011, 09:57:37 AM
my bad

it needs tobe . ' ' .   instead of . ' .
Title: Re: SimpleTwitter
Post by: madfitz on May 29, 2011, 10:29:39 AM
Thank you - works perfectly!

One more thing. Where is this text found so I could edit it? "last messages from twitter"
Title: Re: SimpleTwitter
Post by: Suki on May 29, 2011, 12:06:03 PM
where exactly did you see this text?   
Title: Re: SimpleTwitter
Post by: madfitz on May 29, 2011, 12:17:23 PM
It is the header text above the mod in the info center on the board index.
Title: Re: SimpleTwitter
Post by: Suki on May 29, 2011, 12:19:21 PM
mmm, can I have a screnshot please, I don't remember put that string to this mod, all the strings this mod uses are in /Themes/languages/SimpleTwitter.your_language.php
Title: Re: SimpleTwitter
Post by: madfitz on May 29, 2011, 01:45:13 PM
Quote from: Miss All Sunday on May 29, 2011, 12:19:21 PM
mmm, can I have a screnshot please, I don't remember put that string to this mod, all the strings this mod uses are in /Themes/languages/SimpleTwitter.your_language.php

Ok, I'm mobile right now but when I get back to my desk I'll get a screenshot for you. If it helps, that text is also a clickable link to the twitter account.
Title: Re: SimpleTwitter
Post by: madfitz on May 29, 2011, 05:21:52 PM
Screenshot attached...
Title: Re: SimpleTwitter
Post by: Suki on May 29, 2011, 07:02:08 PM
That seems to be like another mod, what other mods do you have installed?

remember that his mod only post new topics to twitter, it does not get the latest tweets from twitter ;)
Title: Re: SimpleTwitter
Post by: madfitz on May 30, 2011, 01:52:49 AM
Quote from: Miss All Sunday on May 29, 2011, 07:02:08 PM
That seems to be like another mod, what other mods do you have installed?

remember that his mod only post new topics to twitter, it does not get the latest tweets from twitter ;)

Of course! It's the 'Calling Your Twitter' mod. How stupid am I?  :-[

Thanks for the help (with your mod!)
Title: Re: SimpleTwitter
Post by: Bobn on May 30, 2011, 07:07:35 PM
Having trouble setting this up can anyone help?
Title: Re: SimpleTwitter
Post by: Suki on May 30, 2011, 07:43:08 PM
@Bobn   if you specify what's the issues you're having I may be able to help you.
Title: Re: SimpleTwitter
Post by: Bobn on May 30, 2011, 07:49:46 PM
Quote from: Miss All Sunday on May 30, 2011, 07:43:08 PM
@Bobn   if you specify what's the issues you're having I may be able to help you.

Hi Thanks,,

I installed the mod,, ok
Went to twitter and created an app Consumer key, Consumer secret
Clicked on My Access Token, Access Token (oauth_token), Access Token Secret (oauth_token_secret)

Left everything below that unchecked, did not specify boards, did not use bit.ly

Posted in the forum,, did not appear in our twitter page.

Thanks in advance :)
Title: Re: SimpleTwitter
Post by: Bobn on May 30, 2011, 08:15:55 PM
Also using RC 5 if that helps,, I am excited to get this working :)
Title: Re: SimpleTwitter
Post by: Suki on May 30, 2011, 08:18:39 PM
 do you have all your tokens and keys set properly?

also checked the "Enable the SimpleTwitter mod"   check box at the top of the settings?

is your forum  open to guest ?

any errors on your error log?
Title: Re: SimpleTwitter
Post by: Bobn on May 30, 2011, 08:20:37 PM
 do you have all your tokens and keys set properly? <<Yes but I will again

also checked the "Enable the SimpleTwitter mod"   check box at the top of the settings? <<Yes

is your forum  open to guest ? <No

any errors on your error log? <Looking now ;)
Title: Re: SimpleTwitter
Post by: Bobn on May 30, 2011, 08:21:12 PM
No Log Errors
Title: Re: SimpleTwitter
Post by: Bobn on May 30, 2011, 08:23:01 PM
Also All codes are correct

The Forum is in a sub directory, should that matter?  /members/forum
Title: Re: SimpleTwitter
Post by: Suki on May 30, 2011, 08:24:40 PM
Whats your twitter url?

Title: Re: SimpleTwitter
Post by: Bobn on May 30, 2011, 08:26:30 PM
http://twitter.com/#!/TriadHighlander

I can give you access to my forum if you need it
Title: Re: SimpleTwitter
Post by: Suki on May 30, 2011, 08:39:17 PM
well, the mod is very basic and very fragile too, one setting wrong or empty and the mod will automatically stop to prevent errors,    check all your tokens and keys again, make sure they are correct and also make sure this folder  "twitteroauth"  exist on your Sources folder.


thats about all the help I can give you, other than that it will require me to have access to your twitter account to get the tokens and keys and your forum to check if the tokens and keys are set properly.
Title: Re: SimpleTwitter
Post by: Bobn on May 30, 2011, 08:42:33 PM
Quote from: Miss All Sunday on May 30, 2011, 08:39:17 PM
well, the mod is very basic and very fragile too, one setting wrong or empty and the mod will automatically stop to prevent errors,    check all your tokens and keys again, make sure they are correct and also make sure this folder  "twitteroauth"  exist on your Sources folder.


thats about all the help I can give you, other than that it will require me to have access to your twitter account to get the tokens and keys and your forum to check if the tokens and keys are set properly.

That folder is there woth OAuth.php and twitteroauth.php. Do I need to look in these or give that folder special permissions?  I dont have a problem giving you access to the twit account
Title: Re: SimpleTwitter
Post by: Bobn on May 31, 2011, 06:46:23 AM
Would you care to try it?
Title: Re: SimpleTwitter
Post by: Suki on May 31, 2011, 02:09:11 PM
sure, send me a pm with your details and I can give it a shoot.
Title: Re: SimpleTwitter
Post by: Bobn on May 31, 2011, 02:17:32 PM
Quote from: Miss All Sunday on May 31, 2011, 02:09:11 PM
sure, send me a pm with your details and I can give it a shoot.

sent,, Thanks!!
Title: Re: SimpleTwitter
Post by: Bob Mueller on June 12, 2011, 05:12:49 PM
Why would this be incompatible with 2.0 Gold? Upgraded my forum today and wanted to switch Twitter plugins, so I tried this. Got this message: "The package you are trying to download or install is either corrupt or not compatible with this version of SMF. " Install didn't even get to the Testing stage.
Title: Re: SimpleTwitter
Post by: Suki on June 12, 2011, 07:11:45 PM
Bob Mueller   thats because I haven't actually update it.    I do plan to update all my mods to 2.0, however,  I don't have to much free time :(   
Title: Re: SimpleTwitter
Post by: Bob Mueller on June 15, 2011, 08:20:20 PM
Oh, I know that feeling all too well, I'm afraid. I was under the impression though that there wasn't much difference between RC5 and Gold, and I'd rather not go fudging the software version.

It looks like what I want, so I'm looking forward to you getting some time to work on it. Thanks for developing it in the first place! :)
Title: Re: SimpleTwitter
Post by: Suki on June 17, 2011, 03:48:19 PM
Updated to SMF 2.0
Title: Re: SimpleTwitter
Post by: Bob Mueller on June 18, 2011, 12:40:24 PM
Thanks for the update!
Title: Re: SimpleTwitter
Post by: C4G-TK on June 19, 2011, 01:37:59 PM
I'm understanding this mod.  Very cool to have one working for 2.0.  I'm not sure I want to post topics on my Twitter account that I'm not making myself though.  Is there a way to set permissions to only post those topics which certain users like just Admins create in a board and not everyone who posts a new topic?  (I'm sorry if I missed that it could.)
Title: Re: SimpleTwitter
Post by: Suki on June 19, 2011, 08:17:52 PM
I guess I could add a permission on who can publish a topic. (by member group)
Title: Re: SimpleTwitter
Post by: C4G-TK on June 19, 2011, 09:19:38 PM
By membergroup permission would be great!

My thought is that since the twitter account reflects my site, I'm just hesitant on something hitting the universe before I have a chance to see it or approve.  I don't need some spammer or some disgruntled member spamming my forum and additionally have it go out on my twitter as well because they chose the correct board to post something.  By the time I would remedy the situation on the site, I'd have to go back and edit my Twitter posts, but the damage would be done.

I like the mod though and what it could do for me as an Admin though.  Will definitely use it if you decide to do that.
Title: Re: SimpleTwitter
Post by: Suki on June 19, 2011, 09:23:57 PM
that actually makes a lot of sense :)   a

And I will definitely add  a permission  to this mod once I finished on updating my other mods.
Title: Re: SimpleTwitter
Post by: C4G-TK on June 19, 2011, 09:27:20 PM
Thanks, I didn't want you to think I was trying to be one of those "ME! ME! ME!" people who always want mods done their way.  I just saw that it already has great potential for everyone, but also could have a little loophole for malcontents.  LOL.
Title: Re: SimpleTwitter
Post by: Bob Mueller on June 19, 2011, 11:11:03 PM
C4G,

I created a Twitter account just for my forum (@MystryWrtrs) when I started using Twitter to echo posts out. Yes, you'd still have to edit your feed, but it wouldn't necessarily damage your personal reputation.

Even when MAS makes the permission changes, you might consider that idea. And I like the basic idea of permissions, but I'm not sure how you'd decide whose threads go out on Twitter.
Title: Re: SimpleTwitter
Post by: Suki on June 22, 2011, 02:55:40 PM
I been thinking around the permissions for this mod...

I think  to have  the permission by group along with the current option to select which boards the mod will work its the best choice to make sure to  post to twitter  only the topics you want,  if I had a forum I will definitely do not want  a spammer to post a topic and then this topic appear on my twitter account :P  so yes, a permission to post new topics to twitter seems like a good feature to include.
Title: Re: SimpleTwitter
Post by: Suki on June 23, 2011, 11:57:07 AM
This mods is now updated to SMF 2.0

Change Log
-10/March/11  Finished first version.

-23/June/11  1.1. version.
   +Added a permission, now you can manage which membergroups can post new topics to twitter
   +Added a single user ban, now you can put the IDs of single users, those users will not be able to post new topics to twitter even if they are on a group with permissions.
   +Updated to SMF 2.0
   +Cleaning up the Settings part
   +Updated the twitter API
   +Re-work of language strings



to upgrade, just uninstall the old version and install the new one, don't forget to set the proper permissions to each group.
Title: Re: SimpleTwitter
Post by: C4G-TK on June 23, 2011, 01:19:37 PM
That was quick! :o

Should be able to install this later today!  Great!!!  ;)




update!

1) easily installed and worked well
2) the app info process was a breeze
3) the bit.ly process was uber easy

This is one nice mod!  You need to change your name to "Miss All Week" cause you are way too good for just one day! ;)
Title: Re: SimpleTwitter
Post by: C4G-TK on June 28, 2011, 03:14:31 PM
When I have the Mod Enabled, it does send a post to the Twitter Account.  I see it fine and the bit.ly link works, too.  The problem that I am having is that the time of hitting POST on the forum, my screen goes white.  I hit back and look in the forum and the post was actually posted on the forum, but for some reason the process stops and the screen goes white.  There is no error being reported in the error log at all.

When I disable the mod, I don't have this problem.
Title: Re: SimpleTwitter
Post by: Suki on June 28, 2011, 03:21:04 PM
any other error in your error log?


perhaps Twitter servers were too busy at the moment, does this happens every time you create a new topic?
Title: Re: SimpleTwitter
Post by: C4G-TK on June 28, 2011, 03:43:46 PM
No errors at all in the log.

I tried posting in different boards and got the same result.
Turned it off and it was fine.

Each time with it enabled, it posted in the forum and in Twitter, but after hitting POST my screen went white and stopped.
Each time with it disabled, it posted in the forum normally with no white screen.
Title: Re: SimpleTwitter
Post by: C4G-TK on June 28, 2011, 03:49:35 PM
One thing that I just noticed under the admin controls is that the boxes for the bit.ly area are white and not like all the other boxes.

When I go into the settings, they are all the same color (which in my case is dark).  But, once I hit SAVE, the color changes in the bottom two boxes to white.

(see attached)




* I double checked to make sure the files were all in the correct places and the one edit was performed.
* I have this installed on another forum with the same theme in 2.0 and I get the same box color change in there, too.
* On the second forum I have it installed, it does not give a white screen, but it takes about 10 seconds to post the post to the forum.  I'm wondering if it is the Enotifier mod which is conflicting with it?  I have it installed on both forums and while I wait for it to post on the second one, I can watch the Enotifier mod state that the post was made.

Title: Re: SimpleTwitter
Post by: Suki on June 28, 2011, 04:09:44 PM
This issue is happen just now or since the day you installed the mod?

its very likely than Twitter servers are under some stress and its taking too much time in respond.

This mod sends a call to Twitter with your app info,  Twitter API  send back the permissions to be able to post in your Twitter account,  this mod does check if the response back from twitter was OK,  you say that the topic does get posted on twitter, that means the response was ok but perhaps its taking too long, hence the white page after posting.

   if that's the case, then there's nothing we can do about it except to wait until Twitter servers go back to normal.

give it a rest and try in a few hours to see if indeed was Twitter servers or if it is something else.


What theme are you using?    the Bit ly settings has a little bit of JavaScript to enable the fields when you check the  "use the Bit ly" option, perhaps your theme does have a unique class for disable fields.


you can safely remove that feature, on your Sources/SimpleTwitter.php file find and remove:


, 'onclick' => 'document.getElementById(\'simple_twitter_bit_ly_key\').disabled = !this.checked;
document.getElementById(\'simple_twitter_bit_ly_username\').disabled = !this.checked;'


and find and remove:


'disabled' => 'disabled')


theres 2 instance of this, remove both.
Title: Re: SimpleTwitter
Post by: C4G-TK on June 28, 2011, 04:14:01 PM
Didn't notice anything on the second forum which just has a delay after hitting post.
On the one I installed today with the white screen, I noticed right after I installed because I had to make a post on the site.


The theme I'm using is Prince Of Darkness by Antechinus.


I'll try it again later to see what happens.
Title: Re: SimpleTwitter
Post by: C4G-TK on June 28, 2011, 11:16:57 PM
Went ahead and tried it again.  Still get the same result.  Going to try uninstalling another mod to see if it has any effect at all.
Title: Re: SimpleTwitter
Post by: sadaam on June 29, 2011, 10:11:57 AM
how to tweet with this application..? twitter approved my application just 8 min ago..
Title: Re: SimpleTwitter
Post by: Suki on June 29, 2011, 10:50:17 AM
@sadaam please click the little help icon on the mod's settings, that will give you an idea on how to properly setup an app on twitter and to use the keys twitter provide.


@C4G-TK   I install it on my live site today, let me see if I can replicate your issue there.
Title: Re: SimpleTwitter
Post by: sadaam on June 29, 2011, 11:21:26 AM
Quote@sadaam please click the little help icon on the mod's settings,

where is the help icon...?

http://custom.simplemachines.org/mods/index.php?mod=2982   <--- Here..?!! or my forum setiings page..?
Title: Re: SimpleTwitter
Post by: Suki on June 29, 2011, 11:28:45 AM
Is in your forum's settings page for this mod:

index.php?action=admin;area=simpletwitter
Title: Re: SimpleTwitter
Post by: sadaam on June 29, 2011, 01:47:40 PM
i Check it twice..there is no help icon.... i try with deafult theme and coustom theme there is no help icon displayed... what to do now...
Title: Re: SimpleTwitter
Post by: Suki on June 29, 2011, 02:08:25 PM
are you using a different language than English?    change your forum's language to English and you will be able to see the help icon, however, here's the text:

In order to use this mod, you have to create an app on twitter, first, go to:  Client Applications page (http://dev.twitter.com/apps), sign in with your twitter username and password,  click on Register a new application, fill out all the requested fields:
   -Application Name:  this is important, whatever you put in here will appear on every tweet:  via:myforum_name
   -Application URL:  your forum url
   -Application Type:  check the "Client" option
   - Default Access type:  check the "Read & Write" option
   - Application Icon: the icon for the app, can be edited later.
   
once you register your app, now you can see your Consumer key
and Consumer secret.

   to get your token access, clik on "My acces Token"  tab.   you will get your auth token and oauth token secret  do not reveal those.
Title: Re: SimpleTwitter
Post by: sadaam on June 29, 2011, 03:42:43 PM
i do everything as u discribe above but still the mod not work... how can i twit....?
Title: Re: SimpleTwitter
Post by: Suki on June 29, 2011, 03:50:26 PM
did you put all the twitter keys and tokens properly on the mod's settings?

does your host have cUrl enable?   this mod uses cUrl to operate, if your host do not support it, you will not be able to use this mod.
Title: Re: SimpleTwitter
Post by: madfitz on July 01, 2011, 12:28:25 PM
Since you released the update (with permissions) the mod has stopped tweeting :/
Title: Re: SimpleTwitter
Post by: Suki on July 01, 2011, 12:42:47 PM
did you setup the permissions?   at install, only the admins have the permission to post new tweets, you have to give that permission to your member groups.
Title: Re: SimpleTwitter
Post by: madfitz on July 01, 2011, 02:05:41 PM
I did set up permissions but the new topics have been created by admin anyway :/
Title: Re: SimpleTwitter
Post by: Suki on July 01, 2011, 02:33:39 PM
on your Sources/SimpleTwitter.php file find and remove:

|| empty($context['SimpleTwitterPerPost'])


and check again.

also are you posting in a board you chose in the admin panel from not posting new topic to twitter?

your admins have a seconday group?  does this group cannot post new tweets?
Title: Re: SimpleTwitter
Post by: madfitz on July 01, 2011, 05:00:49 PM
I think I found my problem. Tweets don't work when posting with this RSS feed (http://www.simplemachines.org/community/index.php?topic=141776.msg903834#msg903834) mod (setup to post as my admin account). They do work if I post it myself.

Sorry for the confusion!
Title: Re: SimpleTwitter
Post by: C4G-TK on July 02, 2011, 08:38:26 PM
I think I found out the reason for my problem with getting the white pages between my two sites.  (The one site works fine and the other I get a white page with the introduction of a new topic when the mod is installed.)  I contacted my host with the second domain/site.  They recently switched my site to a different server and the PHP version is only 5.1.6 which is older than what it was on previously.  This is the only difference in the two sites.  The other is using 5.2.17 and it works fine.

Sorry for posting the other day about the white page I was getting.  I'm not sure why they are running so many different PHP versions on their servers.  I'm having them switch me over to a more up to date server!  I should have thought to look at this sooner, but when I installed it previously on the other site, it had worked and thought both were at least running 5.2!
Title: Re: SimpleTwitter
Post by: mightygiants on July 04, 2011, 09:38:34 AM
Where can I find my board's ID numbers?  I am having problems excluding boards.
Title: Re: SimpleTwitter
Post by: bruce86 on July 04, 2011, 09:56:07 AM
There is also a version for facebook or google +? Thanks ..:)
Title: Re: SimpleTwitter
Post by: Suki on July 04, 2011, 10:13:13 AM
Quote from: bruce86 on July 04, 2011, 09:56:07 AM
There is also a version for facebook or google +? Thanks ..:)

No.



@mightygiants    you can find your board's ID  if you go to your admin panel/boards and categories


there you will find all your boards, hover the "edit"  link and you will see the board ID at the end of the url.


also if you don't have any rewrite urls mod you can see the Board ID by looking at the url, for example this board has an ID  59:

http://www.simplemachines.org/community/index.php?board=59.0


just enter the number  59  not   59.0
Title: Re: SimpleTwitter
Post by: Bob Mueller on July 09, 2011, 04:04:18 PM
This is working very well, MAS. Really appreciate your work on it.

Someone asked me if it could be modified to add a particular hashtag or two to the tweet. No idea how that would work, but it would be nice. It would almost certainly be a static thing, where you set the hashtags on the admin side.
Title: Re: SimpleTwitter
Post by: Suki on July 09, 2011, 06:17:21 PM
Hi, a few pages ago other user ask for something similar, perhaps its what you want:

http://www.simplemachines.org/community/index.php?topic=430549.msg3057191#msg3057191
Title: Re: SimpleTwitter
Post by: Bob Mueller on July 12, 2011, 10:27:04 AM
Perfect! Thanks!
Title: Re: SimpleTwitter
Post by: MadTurki on August 01, 2011, 08:11:57 PM
Quote from: Miss All Sunday on July 01, 2011, 12:42:47 PM
did you setup the permissions?   at install, only the admins have the permission to post new tweets, you have to give that permission to your member groups.

Was looking for this.  Finally found it! 

Admin -> Members -> Permissions -> (find group) Modify -> Checkmark beside "Simple Twitter mod permissions"

Thank you for a great mod!
Title: Re: SimpleTwitter
Post by: Casa Grande on August 11, 2011, 01:19:29 PM
OK, what's up with the admin page?  It's completely blank?? (see attached)

And where exactly is it located on the menu system?
Title: Re: SimpleTwitter
Post by: Suki on August 11, 2011, 01:37:46 PM
What language are you using?

on install theres a redirect to the admin settings.


Admin / Configuration / SimpleTwitter mod
Title: Re: SimpleTwitter
Post by: Casa Grande on August 11, 2011, 01:48:22 PM
English, and I understand there is a redirect, that is how I am able to see what I have, but there is no ADMIN/CONFIG/STMod
Title: Re: SimpleTwitter
Post by: Casa Grande on August 11, 2011, 01:53:29 PM
and I am using the default theme
Title: Re: SimpleTwitter
Post by: Suki on August 11, 2011, 01:55:08 PM
What SMF version are you using?  this mod  only support SMF 2.0
Title: Re: SimpleTwitter
Post by: Casa Grande on August 11, 2011, 02:05:19 PM
Yes, I am using 2.0, fresh install.  I looked into the install file and noticed it modifies the who.php file.  However, when I look into the who.php file, the line

![CDATA[ 'mods' => array(]]


Does not exist.  Which is odd, considering it said it install just fine, when clearly it did not.  I can't even "uninstall" it  now because I get errors.
Title: Re: SimpleTwitter
Post by: Suki on August 11, 2011, 02:15:15 PM
the "who" edit its only the copyright that appears on your forum  action=credits page, it does not have anything to do with the mod itself.

most likely the hook edits weren't set up properly,  grab  the install.php  file  that comes with the zip, upload it to your forum's root directory,  and call it with your browser   mysite.com/forum/install.php  that should aply all the hooks for this mod to work properly.

also, make sure you have the SimpleTwitter.english.php file in your /Themes/default/languages/  folder, if not, upload it.


that line in your files does exist:

'mods' => array(



this mod looks for this exact line:

      'mods' => array(


and not       'mods' => array()
Title: Re: SimpleTwitter
Post by: Casa Grande on August 11, 2011, 03:33:08 PM
Thanks!  That seemed to do the trick. For some reason, the English files didn't transfer in the install.....appreciate the help!

David
Title: Re: SimpleTwitter
Post by: Casa Grande on August 12, 2011, 12:23:08 AM
I just wanted to say, again, thanks.  I've been monitoring this mod all evening to see how it is working and it is working flawlessly!  I absolutely love it!  I especially like the idea of ignoring certain users :) You really are an "SMF Hero."  Nice work.
Title: Re: SimpleTwitter
Post by: Suki on August 12, 2011, 09:14:19 AM
thank you,  I have some plans for this,  for example, if the topic title contains certain word or words you chose from admin, then that word will become  #word  on the tweet.
Title: Re: SimpleTwitter
Post by: awolexpat on October 04, 2011, 01:24:12 AM
Hello Miss All Sunday,
Thanks for the mod, I have been using it for some time but only recently attempted to exclude a board and a poster, and both have failed; I am using SMF 2.0.1. with 4 themes choosable - default, Blackhead, Clear Sky and Flagrant_alt, although I don't think that should have any bearing on the operation of the mod. There are no error log entries either. I do have the SA Twitter Integration mod installed but have not switched on the boards in that mod for them to be Tweeted as yours already does so well, but I guess this is the most likely source of conflict? Your mod has worked fine up to this point but I am wondering if you know of any issues between the two mods, or whether the other mod has the same efficient functionality as yours does? I can't find anything relating to it in that mod's documentation or topic, so apologies for asking here. I guess what I am asking is whether you know if  I would be able to do the same thing with that mod if I uninstall yours? Alternatively some suggestions to get yours working as it should without me having to uninstall the other one as I really want the ability for my users to log in with Twitter? I am positive that i have entered the correct information in the boxes for board and user id to be excluded so where should I look in the code to check why this isn't working?

P.S. I have just checked the permissions for the group the member belongs to and the permission to post to twitter is also turned off there but the posts keep on appearing. I have also checked the Facebook Integration mod publish boards and they are all turned off as well (I have a link between Twitter and Facebook).
Title: Re: SimpleTwitter
Post by: Suki on October 04, 2011, 11:56:17 AM
I certainly don't know if that mod you mention does the same this mod does.


The mod has a lot of criteria to pass before it creates the twitter, the user must pass all that criteria:


// Twitter mod is disable...
// Or it's a redirect topic...
// Or one of the settings is empty...
// Or this group cannot post new topics to twitter...
// Or this user is banned from posting new topics...
// Either way... just return...
if (empty($modSettings['simple_twitter_enable']) || empty($modSettings['simple_twitter_oauth_token_secret']) || empty($modSettings['simple_twitter_oauth_token']) || empty($modSettings['simple_twitter_consumer_secret']) || empty($modSettings['simple_twitter_consumer_key']) || $msgOptions['icon'] == 'moved' || empty($context['SimpleTwitterPerPost']) || in_array($user_info['id'], $user_denied))
return;


I will guest the issue is on the  $user_denied array, how exactly are you putting the members ID on that filed?   they must be comma separate, example;  1,2,3,4,5


This mod only provides the ability to post new topics to a twitter account, there is no plans to implement a log in with a twitter account.
Title: Re: SimpleTwitter
Post by: awolexpat on October 04, 2011, 09:47:22 PM
Thank you for the reply. I have just one user being denied so just their user number in the box provided, and the same with the board in the relevant box, so no commas required I don't think, unless even with only one entered it needs a comma after? I will explain a little more - I have created a user myself to automatically post using another mod called RSS Feed Poster, and these posts are coming at about two every six hours; while I want these on the board I don't want them tweeted, so I have also created a separate child board just for them (which i did first thinking i would be able to exclude them using your mod; when that didn't work I created the new user to try and exclude them that way). The user I created is in a new group that does not have permission to have their posts tweeted with your mod.

I think that covers everything at my end; I will have a look at the code but I will be fumbling around in the dark metaphorically speaking! I might also try uninstalling and reinstalling but from memory there were no issues when I installed it. I do have a lot of mods installed but I think the only one that might be conflicting is the SA Twitter one - I may raise the issue on their topic but I thought I would try here first as it seems more directly connected to your mod.
Title: Re: SimpleTwitter
Post by: Suki on October 05, 2011, 04:33:18 PM
I will take a look at it, its been a while since the last time I updated this mod, a revision may come in handy.
Title: Re: SimpleTwitter
Post by: awolexpat on October 06, 2011, 05:08:02 AM
Thank you and I will patiently await the outcome.
Title: Re: SimpleTwitter
Post by: Suki on October 06, 2011, 04:14:18 PM
OK, try this, open you Sources/SimpleTwitter.php file and find:

$context['SimpleTwitterPerPost'] = allowedTo('SimpleTwitterPerPost');


and replace with:

/* Lets see if we are allowed to post things to twitter on this board */
$context['SimpleTwitterPerPost'] = allowedTo('SimpleTwitterPerPost', $topicOptions['board']);
Title: Re: SimpleTwitter
Post by: awolexpat on October 06, 2011, 10:18:32 PM
Thank you for looking and helping so quickly - I have made the change, and made a test post from that user in that board, and it seems to have worked! Thank you very, very much. I will keep an eye on it and try some other tests and I will post on here again to confirm it is all good after a couple of days.

EDIT: Uh oh, it didn't work. It took longer than usual for the tweets to appear but they did; I tried both the denied user on the denied board, and the denied user on another board and my admin account on the denied board and all of them showed up on Twitter/Facebook. However I have just realised that despite all other posters having permissions to post to Twitter and all other boards allowing it, only my admin and the created user's posts are now appearing. Something seems to be messed up with either the permissions or in the mod, unless I am missing a setting or something else somewhere. I have another user account on my forum which I have just posted on another (allowed) board as well and that doesn't appear. What i will try now is to set up some new board permission groups to see if that makes any difference.
Title: Re: SimpleTwitter
Post by: awolexpat on October 06, 2011, 11:03:08 PM
OK, scrub some of that last edit! The post made by my allowed user did appear but there is a really long lag now between posting to the forum and posting to Twitter; before it was almost instant. However the original problem still remains - should I undo the change I made?
Title: Re: SimpleTwitter
Post by: Suki on October 07, 2011, 09:44:09 AM
thhs mod does not public new topics to facebook, do you have any other mod installed that do the same thing as mine?

BTW admin account is inmune to the board and user denied
Title: Re: SimpleTwitter
Post by: awolexpat on October 07, 2011, 09:48:34 AM
Hi,
No, I have a link from my twitter account (twitterfeed) to my Facebook account that posts everything posted to twitter on to Facebook. It has nothing to do with SMF. I do have the SA Facebook Integration mod installed but do not have the boards turned on for posting them to Facebook as I already had your mod and my twitter feed set up.
Title: Re: SimpleTwitter
Post by: Suki on October 07, 2011, 09:51:49 AM
does your user is in more than 1 usergroup?
Title: Re: SimpleTwitter
Post by: awolexpat on October 07, 2011, 09:54:35 AM
No, just the one.
Title: Re: SimpleTwitter
Post by: Suki on October 07, 2011, 09:57:59 AM
ok, try this, put a ! at the begining of the line of cde I gave you before
Title: Re: SimpleTwitter
Post by: awolexpat on October 07, 2011, 10:28:04 AM
OK, have done that but a test post by the disallowed user and on the disallowed board still appeared on Twitter.
Title: Re: SimpleTwitter
Post by: Suki on October 07, 2011, 11:24:01 AM
I still cannot reproduce your issue, the only thing I can think off is that you only have 1 id on the user denied array,  maybe if you use 1,1  instead of just 1, the smae for the boards denied option.
Title: Re: SimpleTwitter
Post by: awolexpat on October 07, 2011, 12:25:37 PM
I guess I should have tried that first, as it seems to have worked! Ten minutes have now elapsed since I posted after making that change and no tweet; it is late where I am so I will do some more testing over the next day or so and let you know. Thank you for your help, and I hope this has solved it, but it seems like an odd quirk. ???
Title: Re: SimpleTwitter
Post by: Suki on October 07, 2011, 12:31:33 PM
Some folks would say its a bug  since I have to check if the user and board fields are arrays or strings.  later today I will make an update.

BTW  remove the !  on the code.
Title: Re: SimpleTwitter
Post by: Scrimps on October 07, 2011, 02:34:04 PM
I don't have the mod installed, but it is going to be very helpful for us. Please keep development going, I will install it tonight after the update. Thanks for your hard work.
Title: Re: SimpleTwitter
Post by: ryan_wayong on October 10, 2011, 10:33:54 AM
i got a problem with simple twitter.

i use the latest SMF Engine. after i install your mod, in first week is working. but after 2 weeks it doesn't want to to my twiter account.

when i want to uninstalled, it doesn't want to Uninstall.

it say's "you can't uninstalled. cause there are no uninstall program or code"

can you help me

koreanesia (http://koreanesia.org/forums)
Title: Re: SimpleTwitter
Post by: Suki on October 10, 2011, 10:39:19 AM
on the packages list,   there is an advanced link, click on it,  on the text field type:  SMF 2.0  click on apply, now you can uninstall the mod.

after uninstall  click on advanced and then click on revert.


you can also manually uninstall this mod, go to your phpmyadmin or any other similar tool, go to the settings table and in the row:

integrate_pre_include  delete   $boarddir/Sources/SimpleTwitter.php

on integrate_create_topic  delete SimpleTwitter

on integrate_admin_areas  delete SimpleTwitterAdmin

and on integrate_load_permissions delete SimpleTwitterPermissions

then just delete SimpleTwitter from your Sources folder.
Title: Re: SimpleTwitter
Post by: ryan_wayong on October 10, 2011, 10:41:52 AM
i'll try it, wait for a second
Title: Re: SimpleTwitter
Post by: ryan_wayong on October 10, 2011, 10:44:55 AM
thanks for helping me, successful uninstall.

but why your mod doesn't work in the new SMF?

your mod is the best for me. there are an update for this mod?
Title: Re: SimpleTwitter
Post by: Suki on October 10, 2011, 10:47:34 AM
without more info I cannot help, there is several reasons as to why a mod or this mod will not work.

oh, a last edit, open your Sources/Who.php  file find and remove this:  SimpleTwitter_who(),
Title: Re: SimpleTwitter
Post by: ryan_wayong on October 10, 2011, 11:00:03 AM
There is some problem on sending the item into twitter, i don't expert in PHP.

but why you don't tested it?
Title: Re: SimpleTwitter
Post by: Suki on October 10, 2011, 11:23:05 AM
I tested it, it works for me and works for every user who has downloaded this mod and works for the team member who reviewed this mod.

you need cURL library and php 5.2+  you also need a twitter API key.

this mod also work on permissions and by boards,  you need to check if your users has the proper permission.
Title: Re: SimpleTwitter
Post by: ryan_wayong on October 10, 2011, 11:29:01 AM
where i can get all of it? i must downgrade my smf? igot the latest PHP onmy server

any solution?
Title: Re: SimpleTwitter
Post by: Suki on October 10, 2011, 11:33:50 AM
check the mods description, there I explain how to get the twitter API keys.

you need to ask your host if they have cURL enable on your server.

you can configure the permissions on the admon/ permissions page.

you dont need to downgrade anything.
Title: Re: SimpleTwitter
Post by: awolexpat on November 09, 2011, 10:00:31 AM
Just checking back in on this as I realise I forgot to update - the fix on the previous page of this topic worked, so thank you Miss All Sunday for both the fix and this great mod.
Title: Re: SimpleTwitter
Post by: KeystoneAirsoft on November 14, 2011, 09:13:36 PM
Hello all,

First time posting here on SMF.

Have a question pertaining to this mod.  Is this available or compatible for SMF 2.0.1?  I did download it and tried to install via the Package manager, but received a message stating "The package you are trying to download or install is either corrupt or not compatible with this version of SMF".

Thank you for your time in advance.
Title: Re: SimpleTwitter
Post by: Suki on November 14, 2011, 09:17:12 PM
Hi, welcome to SMF.

Yes, this mod its compatible with SMF 2.0.1, you just need to use the emulate feature:

http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn't_work_in_my_SMF_version

I've been focused on other projects and haven't had time to update all my mods to support 2.0.1 yet.
Title: Re: SimpleTwitter
Post by: KeystoneAirsoft on November 14, 2011, 09:52:22 PM
Hi Miss All Sunday,

Thank you for the welcome and thank you very much for that information as well.  Worked like a charm.  I come from a paid forum era so SMF is all new to me.  I used SMF a few years back when 1.1.15 was new, but wasn't too impressed.  But since coming back, seeing everything that has changed from that earlier version and the awesome mods I am now a SMF believer.  So I am now converting all my commercial forums (4) over to SMF. 

I can understand the issue with focusing on other projects as I am in the same boat now with converting 4 forums, running 3 eCommerce sites plus working a 50+ hour job ;)

Good Luck with your other projects and once again Thank You for your help and warm welcome.

 
Title: Re: SimpleTwitter
Post by: Kurogane on November 18, 2011, 11:59:07 AM
Quote from: Bobn on May 30, 2011, 08:42:33 PM
Quote from: Miss All Sunday on May 30, 2011, 08:39:17 PM
well, the mod is very basic and very fragile too, one setting wrong or empty and the mod will automatically stop to prevent errors,    check all your tokens and keys again, make sure they are correct and also make sure this folder  "twitteroauth"  exist on your Sources folder.


thats about all the help I can give you, other than that it will require me to have access to your twitter account to get the tokens and keys and your forum to check if the tokens and keys are set properly.

That folder is there woth OAuth.php and twitteroauth.php. Do I need to look in these or give that folder special permissions?  I dont have a problem giving you access to the twit account
How you solve this problem? i'm having the same issue
Title: Re: SimpleTwitter
Post by: Suki on November 18, 2011, 12:14:45 PM
Quote from: Kurogane on November 18, 2011, 11:59:07 AM
Quote from: Bobn on May 30, 2011, 08:42:33 PM
Quote from: Miss All Sunday on May 30, 2011, 08:39:17 PM
well, the mod is very basic and very fragile too, one setting wrong or empty and the mod will automatically stop to prevent errors,    check all your tokens and keys again, make sure they are correct and also make sure this folder  "twitteroauth"  exist on your Sources folder.


thats about all the help I can give you, other than that it will require me to have access to your twitter account to get the tokens and keys and your forum to check if the tokens and keys are set properly.

That folder is there woth OAuth.php and twitteroauth.php. Do I need to look in these or give that folder special permissions?  I dont have a problem giving you access to the twit account
How you solve this problem? i'm having the same issue

what PHP version are you using?  remember, this mod only works with php 5.2 or higher, you will also need the cURL library, otherwise your forum will not be able to connect with twitter.
Title: Re: SimpleTwitter
Post by: Kurogane on November 18, 2011, 12:29:55 PM
PHP Version 5.3.6 and curl 7.21.6
Title: Re: SimpleTwitter
Post by: Suki on November 18, 2011, 12:32:31 PM
Quote from: Kurogane on November 18, 2011, 12:29:55 PM
PHP Version 5.3.6 and curl 7.21.6

do you properly created the twitter app and set the correct keys? does you forum is open to guest?
Title: Re: SimpleTwitter
Post by: Kurogane on November 18, 2011, 12:38:28 PM
Yes, i check 5 times and i'm set correctly keys, yeah is open to guest.
Title: Re: SimpleTwitter
Post by: Suki on November 18, 2011, 12:51:47 PM
can I see a link to your forum?

also, check if you set up the boards where this mod will work properly as well as check if the users who post new topics on those boards do have the permission to send topics to twitter.
Title: Re: SimpleTwitter
Post by: Kurogane on November 18, 2011, 01:03:01 PM
I'm posting as admin, also i can give you access in all you need i don't care.
Title: Re: SimpleTwitter
Post by: Suki on November 18, 2011, 01:32:18 PM
Well, even as an admin, if you don't set up the boards the mod will not work.

is a single board where you want to post topics to twitter?  if so, on the mod settings page, on the board setting try typing the board id twice like this:

1,1

and see if that helps.
Title: Re: SimpleTwitter
Post by: Kurogane on November 18, 2011, 02:22:00 PM
I'm lost here what "mod settings page, on the board setting" i not see any "board setting"
Title: Re: SimpleTwitter
Post by: Suki on November 18, 2011, 02:23:38 PM
mod settings page  is the page within your admin panel where you can configure the mod.

board setting  is where you type the board's IDs where you want this mo to work.
Title: Re: SimpleTwitter
Post by: Kurogane on November 18, 2011, 02:35:04 PM
The board setting i see is

Check to define the boards where this mod will not work

i don't check that block for board and user i leave in blank

Title: Re: SimpleTwitter
Post by: Kurogane on November 21, 2011, 11:15:12 AM
Still not working... Other think i saw is in  Client Applications page not exist or i can't find it "Application Type: check the "Client" option" not sure if this affect the process
Title: Re: SimpleTwitter
Post by: Suki on November 21, 2011, 11:56:47 AM
Ask I said earlier, you need to properly set up the twitter app before the mod can work.
Title: Re: SimpleTwitter
Post by: Kurogane on November 21, 2011, 02:40:12 PM
Well, i follow out how create and setup correctly twitter app and the only is not set  is"Application Type: check the "Client" because there  is not option.

If you can help me figure out how properly set up the twitter app would be helpful
Title: Re: SimpleTwitter
Post by: Suki on November 21, 2011, 02:47:59 PM
You need to have a twitter account:

https://dev.twitter.com/apps/new

fills up all the details

Name: *

Your application name. This is used to attribute the source of a tweet and in user-facing authorization screens. 32 characters max.
Description: *

Your application description, which will be shown in user-facing authorization screens. Between 10 and 200 characters max.
WebSite: *


leave the callback url empty.

once you set up properly, on the settings tab you will chose under application type:

Read, Write and Access direct messages


configure the mod's settings with the keys and OAuth tokens
Title: Re: SimpleTwitter
Post by: Kurogane on November 21, 2011, 03:41:34 PM
Same setting i set and everything is correct.

Can you check it for me? if not a problem of course.
Title: Re: SimpleTwitter
Post by: Suki on January 05, 2012, 04:17:35 PM
OK New version 1.2:

Change Log
-5/Jan/12 1.2
   +Compatible with 2.0.x
   +fixed bug on users_denied and boards array
   +Updated twitter library
   +Disable the admin form via JavaScript if cURL is not installed
Title: Re: SimpleTwitter
Post by: humbleworld on January 06, 2012, 04:00:35 AM
Any tutorial on how to create a Twitter app?
Title: Re: SimpleTwitter
Post by: Suki on January 06, 2012, 09:01:26 AM
go to:  Client Applications page (http://dev.twitter.com/apps), sign in with your twitter username and password,  click on Register a new application, fill out all the requested fields:
   -Application Name:  this is important, whatever you put in here will appear on every tweet:  via:myforum_name
   -Application URL:  your forum url
   -Application Type:  check the "Client" option
   - Default Access type:  check the "Read & Write" option
   - Application Icon: the icon for the app, can be edited later.
   once you register your app, now you can see your Consumer key
and Consumer secret.
  to get your token access, clik on "My acces Token"  tab.   you will get your auth token and oauth token secret  do not reveal those.



Theres also a tutorial on the twitter dev page
Title: Re: SimpleTwitter
Post by: humbleworld on January 06, 2012, 12:15:20 PM
Thank you Suki for the guide. Much appreciated!
Title: Re: SimpleTwitter
Post by: Eclipse16V on January 12, 2012, 06:20:06 AM
Thanks for this Mod
Title: Re: SimpleTwitter
Post by: 05185736 on January 18, 2012, 07:17:31 PM
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.
On SMF 1.1.16
Title: Re: SimpleTwitter
Post by: Arantor on January 18, 2012, 07:45:58 PM
The mod is only compatible with SMF 2.x as per http://custom.simplemachines.org/mods/index.php?mod=2982
Title: Re: SimpleTwitter
Post by: rootuid on January 26, 2012, 10:02:22 AM
Great mod. however the titles in bold below should be changed to their correct twitter titles to avoid confusion.Now it worked once and since has stopped!

I have attached my system info below, I believe it is up to date for this mod. I posted a new topic however it was not tweeted. Do I have to setup permissions?
Enable the SimpleTwitter mod.

Access level    Read and write
twitter consumer key
twitter consumer secret
oauth token -- This is my OAuth Consumer key
oauth token secret  -- This is OAuth  Access token secret




curl
cURL support    enabled
cURL Information    libcurl/7.21.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5


Additional Modules
Module Name
ionCube Loader

PHP Version 5.2.16
Title: Re: SimpleTwitter
Post by: Suki on January 26, 2012, 12:11:44 PM
What confusions?  it is the same:

oauth token = Access token.
oauth token secret = Access token secret.


enter dev.twitter.com/  sig in, go to OAuth tool  and there is all the info you need.


The mod use permissions, you must check that whoever writes a new topic you want to appear in twitter must have proper permissions and the board shouldn't be in the denied board list.
Title: Re: SimpleTwitter
Post by: rootuid on January 27, 2012, 05:12:08 AM
Quote from: Suki on January 26, 2012, 12:11:44 PM
What confusions?  it is the same:

oauth token = Access token.
oauth token secret = Access token secret.


enter dev.twitter.com/  sig in, go to OAuth tool  and there is all the info you need.


The mod use permissions, you must check that whoever writes a new topic you want to appear in twitter must have proper permissions and the board shouldn't be in the denied board list.

It confused me :) Ok I see the permission wasn't set and that was the problem. Many thanks.
Title: Re: SimpleTwitter
Post by: rootuid on January 29, 2012, 06:16:46 PM
I'm back as Arnie said :) I spoke to soon, only admins new topics are posted to twitter. All other user's new topics are not posted :( I checked the other users permissions and they are ticked
Simple Twitter mod permissions    
   Post new topics to Twitter.

Any ideas what's wrong ?
Title: Re: SimpleTwitter
Post by: Suki on January 29, 2012, 06:41:24 PM
Sometimes the users are in 2 different groups, if on of the groups doesn't have the permission then it won't work.

Title: Re: SimpleTwitter
Post by: glouk7 on February 02, 2012, 07:49:47 PM
Hi Suki,

First of all congratulations for your mod, i am trying actually to make it work, and i read all the posts here and i am not sure what is going wrong

I've checked permissions, keys, tokens all.. i also did parse the mod to 2.01 version (actually the files/corrections it suggested were correct)
but it seems it doesn't work

i gave permissions to all membergroups (and i denied to 4 boards to post to twitter)

Is administrator also need a permission to do that? I couldn't modify administrator permissions (i am the administrator)

any idea?

thanks in advance
Title: Re: SimpleTwitter
Post by: Dave123 on February 04, 2012, 07:10:44 PM
I have to give it up. the mod wont work for us.
installing several times en check check and doublecheck the settings.
send a pm weeks ago for have a look in our forum also



Title: Re: SimpleTwitter
Post by: rootuid on February 07, 2012, 08:51:45 AM
I gave up on this mod as it wasn't working. I bought a commerical mod that worked straight out of the box.
Title: Re: SimpleTwitter
Post by: Suki on February 07, 2012, 10:23:59 AM
@Dave123  @uid @glouk7   without any data I cannot help...


The mod needs php 5.2 or greater, I don't know what php version you have or what steps you made, I don't know if you correctly set up your dev account either, I don't know if you are using SMF 2.0.x, this mod only works with SMF 2.0.x.

Most of the commercial scripts work because they control your account, that is, you actually gave them permission to post things for you in your account, This mod does not do that, all this mod does is provide the necessary tools for you, granted, you have to manually create a dev account in twitter but that's about it, you own the account and no one but you have access to it.

Oh and please do not pm me for support. I don't do 1 on 1 support.
Title: Re: SimpleTwitter
Post by: Dave123 on February 08, 2012, 05:09:21 PM
sorry, i thought you could have a look inside the forum.

yes, php 5.2 is working bij htaccess, twitter is on the whitelist by our provider
forum was 2.0.1 en now updated to 2.0.2.
set permissions

http://imageshack.us/photo/my-images/833/simpletwitter.png
http://img20.imageshack.us/img20/6853/simpletwitter2.png

Title: Re: SimpleTwitter
Post by: Suki on February 08, 2012, 05:22:44 PM
Please attach the image here rather than using an external site full of ads.

do you have cURL installed on your server?

Does the twitter files exists in your Sources folder?  it should be a folder called twitteroauth with 2 php files inside.

Does your users have more than 1 member group?  if so, all the user member groups should be able to post things to twitter, if an user has 2 or more groups and 1 of those groups cannot post things then the mod won't connect to twitter.

The "regular user"  is also a member group.
Title: Re: SimpleTwitter
Post by: rootuid on February 08, 2012, 05:51:03 PM
Hi,
I'm trying to uninstall but it fails, any ideas how to uninstall it ?:


   1.    Adapt Database    install.php    
*    2.    Execute Modification    ./Sources/Who.php    Test failed
      1.    Replace    ./Sources/Who.php    Test failed

Code: (Find) [Select]

      'mods' => array(
         SimpleTwitter_who(),

Code: (Replace) [Select]

      'mods' => array(



thanks.
Title: Re: SimpleTwitter
Post by: Suki on February 08, 2012, 06:00:03 PM
You can safely not add that part, it only displays the mod's copyright on the credits page. nothing to do with the actual mod performance.

Attach that file so I can remove that part manually.
Title: Re: SimpleTwitter
Post by: Dave123 on February 12, 2012, 11:20:29 AM
Quote from: Suki on February 08, 2012, 05:22:44 PM
Please attach the image here rather than using an external site full of ads.

do you have cURL installed on your server?

Does the twitter files exists in your Sources folder?  it should be a folder called twitteroauth with 2 php files inside.

Does your users have more than 1 member group?  if so, all the user member groups should be able to post things to twitter, if an user has 2 or more groups and 1 of those groups cannot post things then the mod won't connect to twitter.

The "regular user"  is also a member group.


(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg710.imageshack.us%2Fimg710%2F967%2Fsimpletwitter.png&hash=6b6802bdc02226c5836dc672d13c0697806213a0)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg205.imageshack.us%2Fimg205%2F6853%2Fsimpletwitter2.png&hash=f99c64db688e290512fecda87ab22a0974073736)

cURL: twitter is placed on the whitelist by our provider
twitteroauth excist and got permissions
I tried as a admin en got all the permissions. Given permissions to all the members btw.

Quoteyes, php 5.2 is working bij htaccess, twitter is on the whitelist by our provider
forum was 2.0.1 en now updated to 2.0.2.
set permissions

Title: Re: SimpleTwitter
Post by: Suki on February 12, 2012, 11:32:18 AM
Create a phpinfo file and link it here

What is phpinfo.php? (http://www.simplemachines.org/community/index.php?topic=18250.0)

Title: Re: SimpleTwitter
Post by: Dave123 on February 12, 2012, 11:40:52 AM
http://hayabusi.reallin.nl/phpinfo.php
Title: Re: SimpleTwitter
Post by: Suki on February 12, 2012, 12:58:17 PM
That file is not what I asked, please do follow the instructions on the topic I linked and create a phpinfo file.
Title: Re: SimpleTwitter
Post by: Dave123 on February 14, 2012, 10:36:55 AM
QuoteMaking a phpinfo.php is simple.  Just open Notepad or any other text editor, and enter the following:


<?php phpinfo(); ?>


Now save it as "phpinfo.php". 

Once you have this file saved, upload it via FTP to your site.


shoot me.
This what i did, what else is there?
not that simple?

Title: Re: SimpleTwitter
Post by: Suki on February 14, 2012, 04:37:59 PM
it is that simple, but it seems like you copy/paste the entire topic....  you just need to put this:

<?php phpinfo(); ?>

in the file, nothing else.
Title: Re: SimpleTwitter
Post by: Dave123 on February 15, 2012, 07:24:25 PM
:-)
no idee how that happens.... i was shore only drop <?php phpinfo(); ?> in it.
must be a ghost.
it looks different now
Title: Re: SimpleTwitter
Post by: Suki on February 15, 2012, 07:32:35 PM
Looks fine, pm all your tokens and keys and I will make some test on local and on my server.
Title: Re: SimpleTwitter
Post by: bigberty on February 16, 2012, 08:46:56 AM
I can only get this to work for Admin. I've set the permissions for Regular Members, Global Moderator and Moderator. Not using bit.ly. No restriced boards or members. Guests have acess to the forum but can not post.

SMF 2.0.2
SimpleTwitter 1.2

Any ideas?
Title: Re: SimpleTwitter
Post by: Suki on February 16, 2012, 10:15:03 AM
Like I said on previous post, check your permissions...  "regular user"  is a separate group with it's own set of permissions and everybody is included on that group, if that group doesn't have post access then the user will not be able to post to twitter.


You also need to check if the users are posting in a board you marked as a board where the mod will not work.
Title: Re: SimpleTwitter
Post by: medstorez on February 16, 2012, 01:35:46 PM
Thanks!

hope this mod will be useful
Title: Re: SimpleTwitter
Post by: bigberty on February 17, 2012, 02:55:24 PM
Thanks for the response, but that doesn't really help much...

I haven't marked any board where the mod will not work or any member.

'Check to define the boards where this mod will not work' is left unchecked.
'Put the board's ID where you DO NOT want this mod to work.' is left empty.
'Put the user's ID that will not be able to Post new Topics to twitter.' is left empty.
'HelpUse the bit.ly API to short the url?' is unchecked.

I have given permissions to Regular Members, Global Moderator and Moderator. There are no Moderators and 2 Global Moderators.

Do you think I should restrict permissions to only Regular Members?

There is obviously a problem here.
Title: Re: SimpleTwitter
Post by: Suki on February 17, 2012, 07:11:14 PM
Do you use php 5 or greater? 
Do you have cURL enable?

90% of the issues with this mod are related to permissions...  that's why I always tell users to check and double check the permissions.

Do you have custom permissions by boards?

If you as an admin can post things to twitter then the problem is the permissions.
Title: Re: SimpleTwitter
Post by: Dave123 on February 19, 2012, 03:12:39 PM
nope even es admin it won't work yet
Title: Re: SimpleTwitter
Post by: bigberty on February 20, 2012, 09:26:39 AM
php 5.2.17
curl 7.21.7

I have checked the permissions about 50 times now. SimpleTwitter is ticked for every group except Guests. No custom permissions by boards.

cURL is not mationed in the php.ini, should it be?
Title: Re: SimpleTwitter
Post by: Suki on February 20, 2012, 09:47:37 AM
Yes, cURL  must be properly installed on your server.  Usually it must appear on your php.ini, something like:

extension=php_curl.dll

I've been thinking on adding a pre-check on install to make sure people's server have all the requirements this mod needs,  hopefully will do that today.
Title: Re: SimpleTwitter
Post by: bigberty on February 20, 2012, 11:23:00 AM
That will probably save you a lot of trouble.

I have no idea where to put 'extension=php_curl.dll' in php.ini, but phpinfo says it is installed an running.
Title: Re: SimpleTwitter
Post by: Suki on February 20, 2012, 01:21:36 PM
its suppose to appear on your php.ini file already, if you don't have that, then probably you don't have curl or have a weird server configuration.
Title: Re: SimpleTwitter
Post by: bigberty on February 21, 2012, 07:12:27 AM
Probably just a weired server configuration then, I'm with BlueHost. cURL is definately installed and running. If it wasn't I guess it wouldn't work for Admin? So it must be something else.
Title: Re: SimpleTwitter
Post by: Suki on February 21, 2012, 09:40:50 AM
I've been searching, it is not clear if your users must have a twitter account (a regular one, not a dev account) to be able to post things on the twitter account you specified, I've been searching and couldn't find anything.
Title: Re: SimpleTwitter
Post by: Dave123 on March 04, 2012, 09:16:45 AM
Quote from: Suki on February 15, 2012, 07:32:35 PM
Looks fine, pm all your tokens and keys and I will make some test on local and on my server.

did you have the oppertunity allready to take a look?
Title: Re: SimpleTwitter
Post by: Suki on March 04, 2012, 02:21:25 PM
I haven't, sorry.

Last time I enter the dev account at twitter I saw some changes to their API and how it connects and stuff, I need to see how exactly is working now.
Title: Re: SimpleTwitter
Post by: crashmore on March 13, 2012, 02:55:33 PM
I am having this exact same issue. I made sure php and curl met the requirements and I've checked and rechecked permissions. Admins can post fine, no one else can.. I'm stumped.

Quote from: bigberty on February 20, 2012, 09:26:39 AM
php 5.2.17
curl 7.21.7

I have checked the permissions about 50 times now. SimpleTwitter is ticked for every group except Guests. No custom permissions by boards.

cURL is not mationed in the php.ini, should it be?
Title: Re: SimpleTwitter
Post by: Suki on March 13, 2012, 03:04:46 PM
I need to check this mod again, twitter changes the way it's API works and I have the feeling the user must have a twitter account on it's own to create the post to twitter.
Title: Re: SimpleTwitter
Post by: crashmore on March 13, 2012, 03:18:53 PM
My other users in the admin group seem to be able to post just fine to the twitter account. If a user isn't in the admin group they can't.
Title: Re: SimpleTwitter
Post by: Suki on March 13, 2012, 03:25:02 PM
To me it's a permission issue, usually the "Registered Members"  doesn't have the permission to post and since all the users are in this group, this means that no one would be able to post to twitter.
Title: Re: SimpleTwitter
Post by: crashmore on March 13, 2012, 03:46:16 PM
I thought that's what it was too, but I have spent a great deal of time checking and rechecking. The registered members group as permission checked off to allow tweets...
Title: Re: SimpleTwitter
Post by: Suki on March 13, 2012, 03:59:07 PM
Quote from: crashmore on March 13, 2012, 03:46:16 PM
I thought that's what it was too, but I have spent a great deal of time checking and rechecking. The registered members group as permission checked off to allow tweets...

You should give the permission  not setting it off.

Also, if you have several permission profiles then you need to asign the permission to each of your permissions profiles
Title: Re: SimpleTwitter
Post by: crashmore on March 13, 2012, 04:10:28 PM
I mistyped I mean I had permission selected... Here is what the group looks like as well as all the others:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ffarm8.staticflickr.com%2F7043%2F6980084847_b402120fd4.jpg&hash=24fab39e03bd41d354c352594d98319f427c6a95)
Title: Re: SimpleTwitter
Post by: Suki on March 13, 2012, 04:16:27 PM
Do you have the "Enable permissions for post count based groups"  setting on?

On the general permissions, select all usergroups and on Advanced Options select "add permission"  and then select the simpletwitter permission on the "select a permission" list, click on set permission.
Title: Re: SimpleTwitter
Post by: crashmore on March 13, 2012, 04:21:01 PM
Yes I have that enabled and I did as you suggested and still no change.

BTW I really appreciate the trouble shooting help.
Title: Re: SimpleTwitter
Post by: crashmore on March 13, 2012, 04:24:32 PM
FYI I also just had another admin login who noticed the feature I has setup and he was able to post and it went right to twitter np.
Title: Re: SimpleTwitter
Post by: Suki on March 13, 2012, 04:25:24 PM
Open Sources/SimpleTwitter.php, find:

'moved' || empty($context['SimpleTwitterPerPost']) ||

replace with

'moved' ||


try to create a new topic with a regular user account.
Title: Re: SimpleTwitter
Post by: crashmore on March 13, 2012, 04:38:01 PM
That worked.
Title: Re: SimpleTwitter
Post by: Suki on March 13, 2012, 04:44:16 PM
Then it was a permission issue since that variable is just an either 0 or 1,  1 means the user can post, 0 means they cannot post.
Title: Re: SimpleTwitter
Post by: crashmore on March 13, 2012, 04:47:07 PM
I've figured all along it was a permissions issue I just have not been able to find where it was being blocked... I would be happy to give you a login into my admin panel through pm if you would like to take a look. I may be missing something simple but I've gone over it looking for the problem until I've nearly gone cross eyed... I cant figure out what setting or permission may be being inherited etc that could be causing it.
Title: Re: SimpleTwitter
Post by: bigberty on March 21, 2012, 07:40:18 PM
Quote from: Suki on March 13, 2012, 04:25:24 PM
Open Sources/SimpleTwitter.php, find:

'moved' || empty($context['SimpleTwitterPerPost']) ||

replace with

'moved' ||


try to create a new topic with a regular user account.

I tried this and it worked for me too. Is it safe to leave it this way or will it break any functionallity?
Title: Re: SimpleTwitter
Post by: Suki on March 21, 2012, 07:44:36 PM
It won't break anything, all that tip do is removing the permission system check, so basically, the permission system is revoked and everyone (including guest) can post new topics to twitter.
Title: Re: SimpleTwitter
Post by: Dave123 on March 27, 2012, 05:46:44 PM
Quote from: Suki on March 13, 2012, 04:25:24 PM
Open Sources/SimpleTwitter.php, find:

'moved' || empty($context['SimpleTwitterPerPost']) ||

replace with

'moved' ||


try to create a new topic with a regular user account.

here still the same, no post on twitter :-((
Title: Re: SimpleTwitter
Post by: Suki on March 27, 2012, 06:46:19 PM
@Dave123 Do you use 2.0.x?  do you have set up your twitter app?  do you have cURL installed on your server?
Title: Re: SimpleTwitter
Post by: Dave123 on April 07, 2012, 12:23:09 PM
Quote from: Suki on March 27, 2012, 06:46:19 PM
@Dave123 Do you use 2.0.x?  do you have set up your twitter app?  do you have cURL installed on your server?

2.0.2
and yes i gived you al the details already.



Quote from: Dave123 on February 12, 2012, 11:20:29 AM
Quote from: Suki on February 08, 2012, 05:22:44 PM
Please attach the image here rather than using an external site full of ads.

do you have cURL installed on your server?

Does the twitter files exists in your Sources folder?  it should be a folder called twitteroauth with 2 php files inside.

Does your users have more than 1 member group?  if so, all the user member groups should be able to post things to twitter, if an user has 2 or more groups and 1 of those groups cannot post things then the mod won't connect to twitter.

The "regular user"  is also a member group.


(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg710.imageshack.us%2Fimg710%2F967%2Fsimpletwitter.png&hash=6b6802bdc02226c5836dc672d13c0697806213a0)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg205.imageshack.us%2Fimg205%2F6853%2Fsimpletwitter2.png&hash=f99c64db688e290512fecda87ab22a0974073736)

cURL: twitter is placed on the whitelist by our provider
twitteroauth excist and got permissions
I tried as a admin en got all the permissions. Given permissions to all the members btw.

Quoteyes, php 5.2 is working bij htaccess, twitter is on the whitelist by our provider
forum was 2.0.1 en now updated to 2.0.2.
set permissions


Title: Re: SimpleTwitter
Post by: actbus on April 22, 2012, 04:29:35 AM
I've had the same issue with tweets only being generated when the thread is created by an admin.

Have checked all the permissions and all are set properly.

I've edited sources/simpletwitter.php as suggested above and looks like that has solved it, but just wanted to mention that I've also had this problem, more FYI than anything else.

Otherwise, have always been very happy with your app, Suki
Title: Re: SimpleTwitter
Post by: Suki on April 22, 2012, 10:11:46 AM
Yeah, the permissions might be wrong somewhere, have to check this and probably do a re-write, unfortunately I have other priorities right now.

Do note that this mod is licensed under an OS license and anyone can update the mod and provide bug fixes.
Title: Re: SimpleTwitter
Post by: SpiritL on April 28, 2012, 11:45:53 PM
Hello, Suki. I have a problem with your mod.
SMF 2.0.2
Russian   UTF-8
But posts in Twitter looks like: ? ? ? ? flower ? ? ? ? ? ? ? ? ? ? http://... (without blanks)
Can you help me?
Title: Re: SimpleTwitter
Post by: Suki on May 02, 2012, 11:03:02 AM
Search this topic, I recall someone posted a fix for that.
Title: Re: SimpleTwitter
Post by: Vladimir Samoilov on May 12, 2012, 02:31:04 PM
Quote from: SpiritL on April 28, 2012, 11:45:53 PM
Hello, Suki. I have a problem with your mod.
SMF 2.0.2
Russian   UTF-8
But posts in Twitter looks like: ? ? ? ? flower ? ? ? ? ? ? ? ? ? ? http://... (without blanks)
Can you help me?

SpiritL, I solved same problem.

In file Source/SimpleTwitter.php find
$twt_message = utf8_decode($msgOptions['subject']);

and replace

$twt_message = iconv("windows-1251","UTF-8",$msgOptions['subject']);

find

$twitter = $connection->post('statuses/update', array('status' =>utf8_encode($mensaje)));

replace

$twitter = $connection->post('statuses/update', array('status' =>iconv("UTF-8", "windows-1251" ,$mensaje)));
Title: Re: SimpleTwitter
Post by: Gà Mái on June 14, 2012, 01:56:01 AM
Suki, i read all 11 pages and check it all, but it not work. :(
Title: Re: SimpleTwitter
Post by: Suki on June 14, 2012, 08:05:06 AM
What exactly didn't work?

Please give as much details as possible, list all the steps you did, your SMF version and your PHP version, if you have cURL installed, etc.
Title: Re: SimpleTwitter
Post by: NiceCarvings on July 06, 2012, 05:56:30 PM
Hi I like this mod!

I cannot stop i form posting my hidden boards. I think because I have pretty urls mod.


Do you have any ideas for me?
Title: Re: SimpleTwitter
Post by: NiceCarvings on July 10, 2012, 03:14:44 AM
I have tried everything and I can't get simple twitter to post a new thread, except when it's posted by an admin.

Can you help me please?


I'm running SMF 2.02  with Simple Portal
Title: Re: SimpleTwitter
Post by: Suki on July 13, 2012, 10:24:59 AM
Open Sources/SimpleTwitter.php  find and remove:

empty($context['SimpleTwitterPerPost']) ||
Title: Re: SimpleTwitter
Post by: NiceCarvings on July 13, 2012, 11:11:24 AM
Quote from: Suki on July 13, 2012, 10:24:59 AM
Open Sources/SimpleTwitter.php  find and remove:

empty($context['SimpleTwitterPerPost']) ||

Thank you! :)

Do you know how to exclude boards from simple twitter when using pretty url's?
Title: Re: SimpleTwitter
Post by: Suki on July 13, 2012, 11:17:15 AM
Disable the mod for a moment, then go to your admin /boards

click on the edit button  and then look at the url, you will see the ID at the end of it.
Title: Re: SimpleTwitter
Post by: MissyNL on October 09, 2012, 09:44:08 AM
I love this mod! However.. installed it ofcourse needs information about my account. I have tried to add a app, but for some reason i am not able to fix this issue. Is there anybody willing to help me with the following:

Put your twitter consumer key here:

Put your twitter consumer secret here:

Put your oauth token here:

Put your oauth token secret here:

Thank you in advance :D
Title: Re: SimpleTwitter
Post by: Suki on October 09, 2012, 10:12:28 AM
You can use another app if you want, multiple sites can use the same app, if you don't mind, you can use my own, I don't really use it.
Title: Re: SimpleTwitter
Post by: cmc87 on October 18, 2012, 02:17:25 AM
Great mod! Worked flawlessly for me.
Cheers!
Title: Re: SimpleTwitter
Post by: Kurogane on October 26, 2012, 02:52:04 AM
Anyone notice if you choose utf8 in SimpleTwitter admin looks a mess? more in IE.
Title: Re: SimpleTwitter
Post by: eyesite on October 29, 2012, 06:51:23 AM
SimpleTwitter has worked great for about a year. Now it does not post on my home page as it once did.
The history is that my site went down mysteriously. The host company figured out it had to do with my changing my password. (cpanel forced me to since the original was over a year old). Somehow that made the database not work.
Anyway they fixed that but after the site was working ok again, SimpleTwitter was not working.
I had the idea to uninstall it and replace it with version 1.2 instead of 1.1 but the uninstall says it cannot uninstall.
So, does anyone have any good ideas on how to make it work again?
My site is eyesite dot com. Sorry if that is against a rule to mention.
Title: Re: SimpleTwitter
Post by: Sapozhnik on November 27, 2012, 03:28:33 PM
Quote from: mamavrn on May 12, 2012, 02:31:04 PM
Quote from: SpiritL on April 28, 2012, 11:45:53 PM
Hello, Suki. I have a problem with your mod.
SMF 2.0.2
Russian   UTF-8
But posts in Twitter looks like: ? ? ? ? flower ? ? ? ? ? ? ? ? ? ? http://... (without blanks)
Can you help me?

SpiritL, I solved same problem.

In file Source/SimpleTwitter.php find
$twt_message = utf8_decode($msgOptions['subject']);

and replace

$twt_message = iconv("windows-1251","UTF-8",$msgOptions['subject']);

find

$twitter = $connection->post('statuses/update', array('status' =>utf8_encode($mensaje)));

replace

$twitter = $connection->post('statuses/update', array('status' =>iconv("UTF-8", "windows-1251" ,$mensaje)));
I think I found mistake, but i'm not shure.  :o
We should change UTF-8 and  windows-1251

Сorrectly:
$twt_message = iconv("UTF-8","windows-1251",$msgOptions['subject']);
and
$twitter = $connection->post('statuses/update', array('status' =>iconv("windows-1251", "UTF-8" ,$mensaje)));
When I changed them, I got BIG russian letters "Р, Э, И"
Title: Re: SimpleTwitter
Post by: Sapozhnik on November 30, 2012, 08:17:12 AM
Next mistakes ;)

1)  I can publish message to Twitter normally, but My users can't send them.
I found that if in options of number board we write only one number, messages from users don't publish.
I wrote two similar number ("2,2")  and mod works normally

2) Windows with help on option's pages don't show message.
Title: Re: SimpleTwitter
Post by: Suki on November 30, 2012, 03:22:45 PM
You should only need to write the numbers:  2,3,4,5, don't include any ' or ".

The help must be outdated by now since twitter changed the way you create apps.
Title: Re: SimpleTwitter
Post by: Sapozhnik on November 30, 2012, 04:04:45 PM
Quote from: Suki on November 30, 2012, 03:22:45 PM
You should only need to write the numbers:  2,3,4,5, don't include any ' or ".

The help must be outdated by now since twitter changed the way you create apps.
I wrote without (") or (') - only one digit. I wrote last post not correctly.  :-[
If I write number only one board, the message from any user does not publish in Twitter.
Title: Re: SimpleTwitter
Post by: Suki on December 03, 2012, 09:06:29 AM
The board setting is for the board where you do not want to publish topics from, you only need to use that setting if you don't want to publish topics from some board, for example, admin boards.
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 09, 2013, 07:34:55 PM
Very nice mod. Works perfectly. Very useful.

My question is when i set my twitter to autopost to my fb page, It posts with a weird mail/arrow icon and it says bit.ly as the title
How can i change the bit.ly and the image posted in fb coming from my twitter?
Image is attached. Thank you for this very nice mod.
Title: Re: SimpleTwitter
Post by: Suki on February 09, 2013, 07:42:02 PM
This mod has nothing to do with posting to facebook. If you want to change the image, take a look at the facebook docs, you cannot change anything in this mod to solve that.
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 09, 2013, 07:48:39 PM
Quote from: Suki on February 09, 2013, 07:42:02 PM
This mod has nothing to do with posting to facebook. If you want to change the image, take a look at the facebook docs, you cannot change anything in this mod to solve that.

Oh, I thought maybe it was sending some default bit.ly link or like default icon to twitter and twitter was sending it to fb. Ok. Anyways, i ll research about it.
Title: Re: SimpleTwitter
Post by: Suki on February 09, 2013, 08:05:04 PM
it will post a bit.ly url if you enable that setting and add your bit.ly credentials, otherwise it will use the regular SMF url
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 09, 2013, 08:33:50 PM
I actually found the problem and solved it. Its not about the mod but it would be a nice thing to add to it.
You need to add below code in index.template.php so twitter and facebook will pull this icon for your forum and post.

<meta property="og:image" content="http://site.com/images/Logo.png"/>

This fixed my icon/image issue perfectly. So I thought I shoudl write here for other people too and maybe you would want to add this to the mod also. But I couldnt figure out how to edit the bit.ly link there yet. I know there is a way for that through FB open graph meta tags also.
Title: Re: SimpleTwitter
Post by: Suki on February 09, 2013, 10:17:37 PM
Twitter doesn't need that meta tag so no, besides, it breaks validation.
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 10, 2013, 04:26:43 PM
Now i got a weird problem.
When people post a new topic, it doesnt post it on my twitter. But when I am logged in the twitter and post a topic It sends it to twitter. Except If I am logged out It again doesnt post it on twitter.

Any Ideas?
Title: Re: SimpleTwitter
Post by: Suki on February 10, 2013, 04:35:02 PM
You need to properly set an app and correctly use the apps credentials.

AFAIK your users doesn't need to be logged in twitter but that might had changed, its been a while since the last time I saw the twitter API schema.
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 10, 2013, 04:45:18 PM
Yep. Just tested again. you have to be logged in to twitter otherwise twitter auto-post doesnt work.
Maybe there is a setting or a way to fix it but its not very useful like this right now.
Title: Re: SimpleTwitter
Post by: Suki on February 10, 2013, 04:52:46 PM
Well, there isn't any setting that can fix this if twitter decided to change the way its API works, it their API and they love to make unexpected changes, if they now require the user to grand permissions to your app to post on their behalf then I'm not going to do any change, it would be a nightmare to maintain.
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 10, 2013, 04:59:31 PM
you are right and i agree with you but what if its not the twitters thing. Do others experience the same issue? Also maybe there is a way around it. I dont mean you should change the code but if there is a way, we should find and post it here to help everybody.
Title: Re: SimpleTwitter
Post by: Suki on February 10, 2013, 05:03:37 PM
Its been ages since the last time I used this mod, I personally do not use it so I wouldn't know if this is a general issue or not.

If others are experience the same issue and provide more details then for sure I will see what I can do.
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 11, 2013, 02:10:05 AM
I am not good at these coding things but you may wanna take a look at this
https://dev.twitter.com/blog/planning-for-api-v1-retirement
Title: Re: SimpleTwitter
Post by: Suki on February 11, 2013, 08:53:55 AM
ugh, looks like they now require user permission to post tweets and everything is under a "current user" context, this means that if an user creates a topic, the tweet will be posted on her/his twitter and not the one you specified. Too much work for something simple.
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 12, 2013, 01:59:36 AM
Quotethis means that if an user creates a topic, the tweet will be posted on her/his twitter and not the one you specified. Too much work for something simple.

No. I tested it twice and it doesnt matter who is logged in to whose account it always posts it to the main twitter account you specified with your consumer key and consumer secret.

As long as the person who is posting a new topic is logged in to their twitter account, it will post to the websites/main twitter account.
Title: Re: SimpleTwitter
Post by: Suki on February 12, 2013, 08:47:53 AM
Quote from: PLAYBOY on February 12, 2013, 01:59:36 AM
Quotethis means that if an user creates a topic, the tweet will be posted on her/his twitter and not the one you specified. Too much work for something simple.

No. I tested it twice and it doesnt matter who is logged in to whose account it always posts it to the main twitter account you specified with your consumer key and consumer secret.

As long as the person who is posting a new topic is logged in to their twitter account, it will post to the websites/main twitter account.

Thats because this mod is still using the 1.0 API...  the behaviour is different in 1.1
Title: Re: SimpleTwitter
Post by: PLAYBOY on February 12, 2013, 12:12:52 PM
So do you think you can work on this to make it more useful? or you just wanna leave it as is?
Title: Re: SimpleTwitter
Post by: Suki on February 12, 2013, 01:02:30 PM
Like I said, if the new API doesn't permit to post on other users twitter page then there is no point in continue with this as you won't be able to post tweets to the account you specified.
Title: Re: SimpleTwitter
Post by: OnlineFunCorner on March 08, 2013, 11:45:13 AM
nothing post on my twitter account when someone post a new topic :-(
Title: Re: SimpleTwitter
Post by: Suki on March 08, 2013, 06:05:46 PM
Yeah, you need to look at the permissions.

Is only a matter of time before this mod gets completely useless becuase of the new twitter  API, perhaps it is now a good time to shut this down.
Title: Re: SimpleTwitter
Post by: akbora on March 31, 2013, 06:00:08 PM
What can I do about Turkish characters? Is there any opinion for this problem?
Title: Re: SimpleTwitter
Post by: PLAYBOY on April 01, 2013, 03:29:06 AM
Where do you need the Turkish characters at?
Title: Re: SimpleTwitter
Post by: akbora on April 02, 2013, 05:20:12 AM
Quote from: PLAYBOY on April 01, 2013, 03:29:06 AM
Where do you need the Turkish characters at?
Thanks. I have solved Turkish characters problem.

New problem: normal member can not to post twitter. Only admin can post. I looked at the goups permission all yes positioın.
Title: Re: SimpleTwitter
Post by: awolexpat on May 02, 2013, 11:38:08 PM
I don't think this has been mentioned elsewhere on this thread, but given the comments on here about the API changes and how this mod will become useless, I decided to uninstall it, which I did, and the system told me it has been successful.

However, some days later I noticed that my Admin menu link was returning 500 errors (along with the Support and Credits one); I didn't put two and two together immediately as I couldn't see how the removal of this mod could have an effect on that. I started a thread - http://www.simplemachines.org/community/index.php?topic=502307.0 - and went through a head scratching process with the very helpful K@. I should have gone with his (and my) first instincts and investigated the uninstallation of this mod, but I tried a number of other avenues first. Anyway, when i finally got to looking at the one file change, I discovered that the relevant code had not been removed from the /Sources/Who.php, and I believe that this is because the parse is wrong. The code I removed was
'<a href="http://missallsunday.com" target="_blank" title="Free SMF mods">FAQ mod &copy; Suki</a>',
         SimpleTwitter_who(),
     
whereas the parse only had the last line - this is, of course, not picked up by the uninstaller as the text is different, so was not removed. Once I removed it my Admin menu links worked perfectly again.

I hope this will help anyone else removing the mod, and also that the parse information gets changed by the author so it will uninstall correctly. Given that quite a few will be removing this for the same reasons I did I would think this is quite important!
Title: Re: SimpleTwitter
Post by: delta5 on October 15, 2017, 12:27:08 PM
Hello, Do I have to create a new twitter account for my forum, or can I use mine? I installed this mod, and created a twitter app, using my twitter ID. I entered all the keys and codes, but I cant seem to make posts show on my account. Posts from within the app that i do manually do show up perfectly. Can anyone tell me what might be wrong? I am fairly new to twitter.  Thanks
Title: Re: SimpleTwitter
Post by: Suki on October 15, 2017, 06:59:21 PM
mod is old and won't work with whatever current API twitter is using. Use a third party rss integration.