<< Home

No tweet send...

Use this forum for issues related to TriniTronic's Nice Article Tweets Plugin.

Moderator: jamesSBT

No tweet send...

Postby ordisport » Tue Aug 31, 2010 12:39 pm

Hi,

I just have your email concerning the new twitter protection.

I download the new plugin and follow all your nstructions to install and configurate it.

I write 2 news articles and no new twitt was send to my twitter account.

Any idea ?

Regards.

Ordisport.

http://www.ordisport.fr
ordisport
Lithos
Lithos
 
Posts: 3
Joined: Tue Aug 31, 2010 12:36 pm

Re: No tweet send...

Postby Michael » Tue Aug 31, 2010 1:37 pm

Did you get any error messages?

Be sure to follow the installation steps in the documentation exactly, http://www.trinitronic.com/index.php/Do ... ation.html

Let me know how it goes.
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2475
Joined: Thu Aug 14, 2008 12:30 am

Re: No tweet send...

Postby ordisport » Wed Sep 01, 2010 4:28 am

Hi Mickeael,

I remove an re-instazll everything and now, it works fine.

Thank you.

Ordisport
www.ordisport.fr
ordisport
Lithos
Lithos
 
Posts: 3
Joined: Tue Aug 31, 2010 12:36 pm

Re: No tweet send...

Postby Michael » Wed Sep 01, 2010 9:09 am

I am glad that we got that you got that working. There is one other thing, in the initial release of version 2 there was a small mistake in the code. This mistake added an extra space to the front of the URL when it is sent to tinyURL.com. This makes it so the shortened URL does not resolve correctly. I am not sure if your copy has this mistake or not. So, if your shortened links are working than you do not need to do anything.

Otherwise, It is a simple fix. You DO NOT need to install the whole extension again. You only need to install part of it. I am going to email you a new plugin. You will leave the component installed and only reinstall the plugin portion of the extension. Here is how you do it.

1. Go to Admin>>Extensions>>Install/Uninstall>>Plugins
2. Check the box next to "System - Nice Article Tweets" and click the uninstall button.
3. Click the Install tab.
4. Click Choose File and find/select the new plugin I emailed you then click upload and install.
5. After installation, go to Admin>>Extensions>>Plugin Manager>>System - Nice Article Tweets and enable the plugin.

That's all there is to it!
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2475
Joined: Thu Aug 14, 2008 12:30 am

Re: No tweet send...

Postby clinlabnav » Sun Sep 05, 2010 6:26 pm

Hi Michael,

Could you please send me the revised plugin you reference in these posts? I installed the new version after I got the e-mail from you and now nice tweets is not sending any tweets to twitter. Nothing shows up in the log tab, but everything is configured correctly.

This was working perfectly in the previous version.
clinlabnav
Tropos
Tropos
 
Posts: 7
Joined: Sun Sep 05, 2010 6:24 pm

Re: No tweet send...

Postby Michael » Sun Sep 05, 2010 7:08 pm

Hi,

if the Nice Tweets is not sending tweets to twitter, then you are having a different issue. The issue in this thread was with the shortened links from tinyurl.com not resolving in the posts on Twitter. If you downloaded the extension any later than mid day (pacific time) on August 31st then you will not have this problem. The tinyurl error was caught within a few hours of releasing version 2.0 of the extension. It was so close in fact that we did not even increment the version number.

The issue you are experiencing is, most likely, that there was a glitch in the initial set up. Because of Twitter's new security protocol, setting up the Nice tweets extension requires a few additional steps. Including registering the app (extension) with http://dev.twitter.com and authorizing a twitter account. Please review the documentation to ensure that you have followed them exactly during the initial set up of the extension.

http://trinitronic.com/index.php/Downlo ... ation.html

~ Best regards
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2475
Joined: Thu Aug 14, 2008 12:30 am

Re: No tweet send...

Postby clinlabnav » Mon Sep 06, 2010 2:47 pm

I downloaded the version almost immediately after receiving the e-mail from you guys regarding the new version and Twitter's changes.

I followed the instructions exactly and everything appears to be setup correctly. My account is enabled under tweet profiles. My twitter account is enabled under twitter accounts and all of the settings are correct under the settings tab.

Nothing shows up on the Nice Tweets tab when something is updated or added.

I just un-installed everything, re-installed the component and followed your directions completely again, updated an article on my site, and still nothing.
clinlabnav
Tropos
Tropos
 
Posts: 7
Joined: Sun Sep 05, 2010 6:24 pm

Re: No tweet send...

Postby Michael » Tue Sep 07, 2010 7:33 am

Hi,

Your site needs to meet the following requirements:

Joomla! 1.5.04 or greater
PHP 5.2.x
cURL (included in most PHP configurations)
OpenSSL (included in most PHP configurations)

Check with your host to ensure that you are running PHP 5.2.x, cURL, OpenSSL.

If all of this is correct, I would be happy to take a look at your installation to ensure that it is configured correctly. You would need to provide me temporary administrative access.

~ Best regards
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2475
Joined: Thu Aug 14, 2008 12:30 am

Re: No tweet send...

Postby Aurelius » Wed Sep 08, 2010 9:16 am

Hi,

I also have a problem with no tweets when publishing an article. I have configured two Twitter accounts in the Nice Tweets section, one I plan to use 'for real', and one to test. I've created a Tweet profile using the test account, setting it to tweet automatically. If I publish a new article, I would expect a tweet to appear on the Twitter page of my test account, correct? I do not see that happen.

I have PHP 5.2.6, and I have confirmed that I have indeed cURL and OpenSSL in my PHP configuration:
[root@host ~]# php -i | grep -i curl
cURL support => enabled
cURL Information => libcurl/7.18.1 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
[root@host ~]# php -i | grep -i ssl
OpenSSL support => enabled
OpenSSL Version => OpenSSL 0.9.8b 04 May 2006

I used the non-test account to register the application on dev.twitter.com. Could this be the problem? If so, can I simply do the whole process again?
Aurelius
Tropos
Tropos
 
Posts: 6
Joined: Wed Sep 08, 2010 9:04 am

Re: No tweet send...

Postby Michael » Wed Sep 08, 2010 10:41 am

This is a puzzler isn't it....

Well, I really am not sure where to begin, my auto-shop teacher in high school always said, "If your car stops running, breaks down on the side of the road, check to see if the car ran out of fuel, before you tear apart the engine looking for any mechanical problems."

I always thought this sounded like sage advise and try to follow it whenever facing new issues, whether they be auto-mechanical in nature, or more mundane like web development.

So let start with some easy stuff.

1. Check all of your accounts in Admin>>Components>>Nice Tweets>>Twitter Accounts and ensure that they are enabled. They should have a green check next to them in the line item row.
2. Also, check the Tweet Profiles to ensure that they are enabled Admin>>Components>>Nice Tweets>>Tweet Profiles.
3. Check that the Tweet Profiles are set to use your desired Twitter account.
4. Check to see that Nice Tweets plugin is enabled, Admin>>Extensions>>Plugin Manager>>System - Nice Article Tweets.

5a. And you said that there are no tweets logged in Admin>>Components>>Nice Tweets?

5b. What happens if you set the Tweet Profile to send tweets "manually"; And then create and save a new article?

5c. Does the unsent tweet show up in the log?

5d. If it does, what happens when you click the send arrow at the right of the log line item?
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2475
Joined: Thu Aug 14, 2008 12:30 am

Re: No tweet send...

Postby Aurelius » Wed Sep 08, 2010 11:12 am

1. Enabled
2. Enabled
3. Yes
4. Enabled
5a. Correct, no tweets logged
5b. Setting the profile to 'manual' doesn't matter, still no tweets logged
5c. No
5d. Since it's not there, this obviously is a no-go for me

I've also tried to turn Include Link / Shorten Link off, without success.

If the tweet is not logged, does that mean it is not created at all? Meaning, this is a settings issue, not so much an account issue?
Aurelius
Tropos
Tropos
 
Posts: 6
Joined: Wed Sep 08, 2010 9:04 am

Re: No tweet send...

Postby Michael » Wed Sep 08, 2010 12:03 pm

If the tweet is not logged, does that mean it is not created at all? Meaning, this is a settings issue, not so much an account issue?


Yes, this is my current line of thought. With the tweets set to manual, the tweet building mechanism should bypass any communications with Twitter and send the tweet straight to the site's database. Thus, it would appear in the log on the components home page (Admin>>Component>>Nice Tweets).

Example Pseudo Code
Code: Select all
if($r['automatic'] == true){

  send to twitter;
  insert tweet in database;

}else {

  insert tweet in database;

}



So, it is as if the plugin is not firing off at all or is deciding that the article being saved does not qualify for tweeting. There are four reasons that I can think of that might cause such an event.

1. You are running a version of Joomla that predates 1.5.4

2. You are not publishing Joomla core articles, either they are not published on save or you are using a third party extension to write and save the articles instead of the standard Joomla core article manager.

3. In your Tweet Profiles, you have specified sections, categories or users to include and the article being saved does not match these specifications.

4. You are using a third party extension that is conflicting with the Nice Article Tweets plugin. However, I highly doubt this last suspect as being the culprit.
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2475
Joined: Thu Aug 14, 2008 12:30 am

Re: No tweet send...

Postby Aurelius » Wed Sep 08, 2010 12:16 pm

In an earlier post you said this requires Joomla 1.5.04, but just now you said 1.5.4. I run on 1.5.15. Can it be as simple as that?

I use the JCE editor (simply because it's a lot better than the core editor), so that could also be a factor. I doubt it, but you never know. I do publish my articles (as a seperate step from saving, actually; I have an editor for the articles). I don't have any specific sections/categories set for NiceTweets.

I may take a look at the code. I'm a programmer myself (though C# is an entirely different beast than PHP), so I'm not daunted. At least it will help me understand how it works exactly :).
Aurelius
Tropos
Tropos
 
Posts: 6
Joined: Wed Sep 08, 2010 9:04 am

Re: No tweet send...

Postby Michael » Wed Sep 08, 2010 12:56 pm

Joomla Version

In an earlier post you said this requires Joomla 1.5.04, but just now you said 1.5.4. I run on 1.5.15.


Sorry for the confusion, Joomla released the version in question labeled as 1.5.4. They meant version 1.5.04. Their numbering scheme goes .8, .9, .10, .11, etc. This can be misleading as .4 can be misconstrued as .40. Your version 1.5.15 has everything needed to make a successful run of it, no worries there.

Tweet on Update

If you are saving and then publishing at a later date, make sure that "Tweet on Update" is enabled in the Tweet Profile. The first save is the first insert into the database, Joomla considers this "new" as in never been in the db. When you return and edit the article to publish it for the first time, Joomla considers this an "update", as in the record is in the db and is being updated.

JCE

As for JCE, I am not familiar enough with it to know how it handles article publishing. Try creating a new article JCE disabled and see if it makes a difference.

Sections, Categories, and Users

One thing I just noticed after playing around with this issue for a bit is with the profile sections, category and user include fields. If there is an white space (space character) entered in the fields the tweet will be cancelled by the extension. This is not very intuitive, as a person would not see the presence of white space without looking for it. I will need to change this in a future revision.

Programming Info

Lastly, by all means take a crack at the code. It is difficult for me to diagnose a problem remotely without any hands on ability. You will have a definite advantage in this respect. I would focus most of my attention on the plugin, as it is responsible for building and sending the tweets. It does pull a class or two from the main component (if memory serves for storing data in the db), but for the most part it is independent. You will find the files for the plugin here

/your_joomla_root_directory/plugins/system/nicearticletweets.php
/your_joomla_root_directory/plugins/system/nicearticletweets.xml

The plugin runs pretty quiet. So, there are not a lot of indicators to work off of. One trick I use a lot is a write to flat file routine, this gives me the ability to take a peek at any portion of the runtime process that I want. Here is how to do it.

1. create a file somewhere on your server or host space. Name it mytrace.log or mytrace.txt. You will need to set the permissions to allow the scritps to read and write to the file. If you are on a Linux box the file permissions need to be set to 777.

2. open the /your_joomla_root_directory/plugins/system/nicearticletweets.php file and at the bottom add the following function (right before the last curly bracket "}"

Code: Select all

function mytrace($data) {

$file = '/full/server/path/to/your/file/mytrace.log';
$handle = fopen($file, 'a') or die("can't open file");
fwrite($handle, $data."\n");
fclose($handle);

}



So the tail end of the script should look something like this:

Code: Select all
function createtinyURL($url)
   {
   
      /*cURL*/
      $curl = curl_init( );
      curl_setopt( $curl, CURLOPT_URL, "http://tinyurl.com/api-create.php?url=".urlencode(trim($url)));
      curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
      curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 10 );
      $content = curl_exec( $curl );
      curl_close( $curl );
      return $content;
      
   }
   
   function mytrace($data) {

   $file = '/full/server/path/to/your/file/mytrace.log';
   $handle = fopen($file, 'a') or die("can't open file");
   fwrite($handle, $data."\n");
   fclose($handle);

   }
   
}



3. enter this line anywhere you want with in the nicearticletweets.php script to grab a peek from the plugin's runtime process:

Code: Select all

$this->mytrace('your string message here');

or

$this->mytrace('get some variable info '.$variable);



Then when you read the flat file it will have logged the new message. If you are on a Linux box and have SSH access, you can run the following command to watch real time updates of the mytrace.log file

tail -f /full/server/path/to/your/file/mytrace.log

Just hit the break key when you want to abort tail.
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2475
Joined: Thu Aug 14, 2008 12:30 am

Re: No tweet send...

Postby Michael » Wed Sep 08, 2010 1:06 pm

There is one more thing I just noticed, it shouldn't make a difference, but perhaps with your particular server configuration it might. The end of the plugin script (nicearticletweets.php) is missing the close script tag "?>"

This is just a syntax formality and it runs fine for me without the tag. In fact when building add-ons for Drupal the proper thing to do is to leave it off. But, before you go gallivanting off on some undertaking, try adding it to the end of the script, save the script and give it another tweet test.

The end of the script will look like this when your done:
Code: Select all
function createtinyURL($url)
   {
   
      /*cURL*/
      $curl = curl_init( );
      curl_setopt( $curl, CURLOPT_URL, "http://tinyurl.com/api-create.php?url=".urlencode(trim($url)));
      curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
      curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 10 );
      $content = curl_exec( $curl );
      curl_close( $curl );
      return $content;
     
   }
   
}

?>

Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2475
Joined: Thu Aug 14, 2008 12:30 am

Next

Return to Joomla: Nice Article Tweets

Who is online

Users browsing this forum: No registered users and 1 guest