Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#241 2013-07-03 07:08:10

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 239
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

Hi everyone. Sorry for remaining so quiet on this one. I’ve not had a lot of free time recently to look into this. The plugin’s code has now been updated (v4.0). Massive thanks to maniqui for fixing the plugin to work with the new API. It’;s really appreciated.

Offline

#242 2013-07-03 07:32:39

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

Thanks workers!


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#243 2013-07-10 14:40:59

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

I have installed this modified version of arc_twitter and it works beautifully except for one weird thing…

I’m using the limit attribute to control how many tweets from my feed appear on my website. The number I use is 4.

What’s weird is that sometimes (like right now) the feed shows only 3 tweets instead of the requested 4. I’m struggling to predict when it does this – earlier today it was fine with 4. As there are definitely more than 3 tweets in my timeline (that’s an easy one to check), is it something to do with caching?

Otherwise, the modifications are perfect.

Offline

#244 2013-07-10 15:26:10

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

Anura, no need to use the modified version I posted, as there is already an official release by monkeyninja.
Regarding your issue, I’ve no idea what could be going on. Sounds like a caching issue, but then, you say that sometimes it works and sometimes it doesn’t.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#245 2013-07-10 15:35:50

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

Thanks for that. Not really being an expert, I sort of got lost around what was going on with changes to this plugin. I’ll give this official version a try this evening.

Offline

#246 2013-07-23 21:29:12

cptbaffo
New Member
Registered: 2013-07-17
Posts: 1

Re: TXP Tweet: arc_twitter and arc_twitter_intents

I apologize if this has already been addressed (I looked but I did not see it anywhere else in this post) but when I upgraded to the new version of the software, 4.0, I get a form_submission_error every time I try to tweet an article. The article does post to twitter but the form does not show “yes” as checked in the update twitter sidebar

I deleted the plug in and reinstalled it but I still get the same error.

Does anyone know hot to fix this?

Thank you.

Offline

#247 2013-07-24 07:33:49

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

I’m having the same problem as aptbaffo.

Offline

#248 2013-07-31 18:24:00

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 595
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

I’m also getting this error with the newest version:

Tag error: -> Textpattern Warning: tag does not exist on line 1202 textpattern/publish.php:1202 trigger_error() textpattern/publish.php:1100 processTags() textpattern/publish/taghandlers.php:3696 parse() textpattern/publish.php:1188 if_section() textpattern/publish.php:1113 processTags() textpattern/lib/txplib_misc.php:1706 parse() textpattern/publish/taghandlers.php:314 parse_form() textpattern/publish.php:1188 output_form() textpattern/publish.php:1100 processTags() textpattern/publish/taghandlers.php:3696 parse()

Any ideas?

Last edited by maruchan (2013-07-31 18:24:09)

Offline

#249 2013-08-05 21:06:58

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 595
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

I also noticed that when I install this plugin, it defaults to “Yes” in the “Activated” column. Does that signify some sort of error, or is that the expected behavior?

Offline

#250 2013-08-08 09:48:31

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

Hi,
I’m getting this error message when saving articles (Articles are saved anyway and tweets are published):
Fatal error: Cannot use object of type stdClass as array in /Applications/MAMP/htdocs/vsv_found_cercle/textpattern/lib/txplib_misc.php(812) : eval()’d code on line 1035
Everything is fine if I disable the tweet.
I’m using arc_twitter-4.0 published on July 2, 2013.
Is there a known solution?
Thx

Last edited by NicolasGraph (2013-08-08 09:50:11)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#251 2013-08-08 10:00:37

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: TXP Tweet: arc_twitter and arc_twitter_intents

@NicolasGraph

What version of PHP are you running in MAMP? Then I’ll try to replicate the error as well.

Offline

#252 2013-08-08 15:01:14

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: TXP Tweet: arc_twitter and arc_twitter_intents

Mostly not related to any of the errors reported on this thread since the release of v4.0, below there is a diff of changes (fixes) that I made to my patched version (previous to the release of v4.0) that it seems that Andy didn’t port to v4.0. Not sure if he missed them, or if there was any good reason not to port them.

global $prefs,$txpcfg,$arc_twitter_consumerKey,$arc_twitter_consumerSecret;

 $arc_twitter = array();
@@ -156,9 +105,9 @@

   switch ($timeline) {
     case 'home': case 'friends':
-      $timeline = 'statuses/friends_timeline'; break;
+      $timeline = 'statuses/home_timeline'; break;
     case 'mentions':
-      $timeline = 'statuses/mentions'; break;
+      $timeline = 'statuses/mentions_timeline'; break;
     case 'user': default: $timeline = 'statuses/user_timeline';
   }

@@ -546,7 +495,7 @@
     $sql = "CREATE TABLE IF NOT EXISTS ".PFX."arc_twitter ";
     $sql.= "(arc_twitterid INTEGER AUTO_INCREMENT PRIMARY KEY,
         article_id INTEGER(11),
-        tweet_id BIGINT(20),
+        tweet_id VARCHAR(100),
         tweet VARCHAR(140),
         tinyurl VARCHAR(30));";

@@ -695,7 +644,7 @@
           ),
           'arc_twitter_suffix' => array(
             'label' => 'Tweet suffix',
-            'value' => $prefix
+            'value' => $suffix
           ),
           'arc_twitter_tweet_default' => array(
             'label' => 'Tweet articles by default',
@@ -891,11 +840,10 @@

         $id = strip_tags(gps('id'));
         if ($id) {
-            $twit->delete('statuses/destroy'.$id);
+            $twit->delete('statuses/destroy/'.$id);
             safe_delete('arc_twitter',"tweet_id = $id");
-        }
-
         pagetop('Twitter','Twitter updated');
+        }

     } else {

@@ -944,7 +892,7 @@
         $out.= tr(td($date,'span')
             .td(arc_Twitter::makeLinks(htmlentities($tweet->text
                 , ENT_QUOTES,'UTF-8')))
-            .td(dLink('arc_admin_twitter','delete','id',$tweet->id,''))
+            .td(dLink('arc_admin_twitter','delete','id',$tweet->id_str,''))
             );
     }

@@ -1083,7 +1031,7 @@
                 , $prefs['arc_twitter_accessTokenSecret']);
             $result = $twit->post('statuses/update', array('status' => $tweet));

-            $tweet_id = (is_object($result)) ? $result[0]->id : 0;
+            $tweet_id = (is_object($result)) ? $result->id_str : 0;

             if ($tweet_id) {

@@ -2448,499 +2396,3 @@
     return implode('&', $pairs);
   }
 }

It fixes:

  • changes in the API URLs (friends_timeline > home_timeline, mentions > mentions_timeline, statuses/destroy > statuses/destroy/).
  • Tweet IDs saved now as a string (varchar(100)), as the API returns it as an string (this is related to the Tweetpocalypse).
  • a minor issue with the prefix/suffix functionality provided by the plugin.

The above is the output of command: diff -uw arc_twitter_v4.0.php arc_twitter_v3.3.1_patched.php. So, the lines marked with + are the ones I’ve changed/added
BTW, ignore the line numbers in the diff, as they won’t probably match yours (as I’m using the plugin from plugin_cache_dir, exported using the Bloke’s Plugin Composer).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB