2008-04-16 23:06:16

Ruhh
Member
iota
Real name: sarah
From: dakota dunes

Re: twitter plugin?

Alright I got rid of the js. Recently uploaded the inc file and installed the simplepie plugin. I need help with getting rid of what’s shown in the list. I want to get rid of the links. I also want to get rid of the prefixes or be able to change them. How can I go about doing those things?


<txp:Ruhh />

Offline

 

2008-10-03 20:32:06

kimili
Plugin Author
zêta
Real name: Michael Bester
From: Massachusetts, USA
Website

Re: twitter plugin?

I’ve been working on a plugin for displaying your latest tweets on your site. I’m currently testing it and expect to be able to release it in the next few days.

Offline

 

2009-10-15 21:23:22

geoff777
Plugin Author
thêta
Real name: Geoff Forster
From: Benarrabá Andalucía Spain
Known languages: en > es
Website

Re: twitter plugin?

I can’t get this plugin to work.

I’ve installed 1.3.2

php5
txp 4.0.8 live
curl – enabled libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
fopen on

custom_1 changed to twitter

twitter info double & triple checked

It did work for a while 9months ago.
Any ideas?
I get no error messages.

Thanks


“Do you think yourself wise? Then there’s a donkey inside your waistcoat”

Offline

 

2011-12-08 07:35:41

bici
Member
iota
Real name: Giovanni
From: vancouver
Known languages: english, italian
Website

Re: twitter plugin?

Hi
This used to work in getting twitter feeds… but no longer:

<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script> <script text="text/javascript" src="http://twitter.com/statuses/user_timeline/bici.json?callback=twitterCallback2&count=2"></script>

anyone know what the proper code is now that we should use?


…. texted postive

Offline

 

2011-12-08 17:44:54

MattD
Plugin Author
sigma
Real name: Matt Davis
From: Monterey, California
Website

Re: twitter plugin?

bici wrote:

anyone know what the proper code is now that we should use?

Does this page on twitter.com help?


My Plugins

In a way, each of us has an El Guapo to face. -Lucky Day (Three Amigos)

Offline

 

2011-12-08 19:11:13

joebaich
Member
lambda
Real name: Joe
From: DC Metro Area and elsewhere
Known languages: En, Sc, Fr, De.
Website

Re: twitter plugin?

Offline

 

2011-12-08 19:12:35

Gocom
Developer
omega
Real name: Jukka Svahn
Website

Re: twitter plugin?

bici wrote:

This used to work in getting twitter feeds… but no longer:

What is the issue? As I see, it works just fine for what it is. Just remember that currently Twitter requires HTTPS (change the protocol). Requests done via non-secure protocol will be force-redirected (which may cause problems you are having). As far as using the script you mentioned goes, it is as simple as:

<!doctype html>
<html lang="en">
<head>
</head>
<body>
	<ul id="twitter_update_list"></ul>
	<script type="text/javascript" src="https://twitter.com/javascripts/blogger.js"></script>
	<script text="text/javascript" src="https://twitter.com/statuses/user_timeline/bici.json?callback=twitterCallback2"></script>
</body>
</html>

The code validates and provides the Tweets the code is supposed select. As the scripts are initialized right away, remember to either place the snippets after the #twitter_update_list node, or load script on an event that takes place after the element is done.

But as said, it works fine for what it is. There are problems in fact. First of all the API you mentioned is deprecated, and might be gone the next day. Second issue is that it doesn’t support Twitter’s new (-er) native re-tweets, and probably neither some other features. So as you are showing only two tweets, you will get none if your two last tweets were native re-tweets (using the new retweet function, not the old tagging thing and such).

And the last issue is the fact that the script is rate limited. If your website is somewhat popular some of the visitors will not see any tweets. When any of the issues arise, the visitor will likely get bunch of JavaScript errors. On JavaScript heavy site this means the whole site breaks. Or takes several seconds to load untill the script timeouts.

If you want get over the rate limiting you will have to use the new APIs and… likely cache the results. To do so, you could use some of the Twitter plugins available. You could also use the feeds directly with any of the XML plugins (like smd_xml). Or you could use those widgets as Matt suggested. Other thing if you like them. Those widgets. They look nice, but do they fit every site.

Does that mean you can’t use the snippet you mentioned? No. Not really. Not for now at least. There is updated version available which supports Twitter’s newer updates. Implementing it is as easy:

<!doctype html>
<html lang="en">
<head>
</head>
<body>
	<ul id="twitter_update_list"></ul>
	<script type="text/javascript" src="https://twitter.com/javascripts/blogger.js"></script>
	<script text="text/javascript" src="https://api.twitter.com/1/statuses/user_timeline.json?screen_name=bici&amp;include_rts=true&amp;count=2&amp;callback=twitterCallback2"></script>
</body>
</html>

It’s just matter changing the API URL. It will also support re-tweets. Provides stable results. Should you use the newer methods, badges or other-than-this API? Maybe. The API documentation isn’t exactly clear, so I do not no if the newer URL is deprecated. Well, mostly is probably up to me failing at reading — and writing apparently. But well, the old URL is. Time to update, I suppose.

Last edited by Gocom (2011-12-08 19:18:05)


Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />

Offline

 

2011-12-08 21:22:45

bici
Member
iota
Real name: Giovanni
From: vancouver
Known languages: english, italian
Website

Re: twitter plugin?

Jukka – Thank-you for your through and illuminating explanation! very much appreciated.

I now have the script working again. The issue was mainly to do with a Safari app called Ghostry that was blocking the scripts ;-)

But i did update the scripts to sue the latest Twitter api. and https

Plus I was able to add the correct scripts ion my friends website as well.

And the bonus is thatI have found your website with a slew of great plugins! a treasure trove!!

May the “Force of Textpattern” be with you


…. texted postive

Offline

 

Powered by FluxBB