marig345 / prpltwtr

Automatically exported from code.google.com/p/prpltwtr
GNU General Public License v2.0
0 stars 0 forks source link

Update to Twitter API version 1.1. 1.0 is depricated #88

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Client (Pidgin, finch, empathy, etc): Pidgin
Client Version: 2.10.7
LibPurple Version: 2.10.7
PrplTwtr Version: 12
Operating System: Fedora 18 64 bit

Problem/Feature request (Be as specific as possible. Steps to reproduce are
especially helpful):

Twitter has (today) depricated their version 1.0 API, and are requiring 
everyone move to 1.1.  As such prpltwtr is receiving the 410 error:

Error verifying credentials: Status code: 410

Please update to version 1.1.  Thanks for the great job on this plugin.

Original issue reported on code.google.com by j...@dwolla.com on 5 Mar 2013 at 5:48

GoogleCodeExporter commented 8 years ago
I know.

Right now, prpltwtr accesses the XML versions (since Pidgin includes xmlnode) 
of the pages, and the 1.1 API only supports JSON.

I don't know if this will ever be changed in prpltwtr; I don't have time to do 
this work right now, and anyway, Twitter seems quite committed to shutting down 
third parties in general.

If someone wants to submit a patch that handles the bulk of the change, I'll be 
glad to help integrate & test it

Original comment by mikeage on 5 Mar 2013 at 8:27

GoogleCodeExporter commented 8 years ago
I will pay a bounty to get this migrated to v1.1. I will start with a bounty of 
5BTC to anyone that gets this plugin working again. Just upload the fixed code 
with your name and BTC wallet#. Once verified you will be credited the 5BTC or 
whatever it is at the time. For those who are not familiar with BTC, 1 BTC = 
~$109USD as of 5:05 PM 6/11/2013

Original comment by fourt...@gmail.com on 12 Jun 2013 at 12:08

GoogleCodeExporter commented 8 years ago
It seems that as of today, the v1 API is disabled. Login fails with "Error 
verifying credentials: The Twitter REST API v1 is no longer active. Please 
migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview."

Original comment by david.ma...@gmail.com on 12 Jun 2013 at 7:44

GoogleCodeExporter commented 8 years ago
Issue 90 has been merged into this issue.

Original comment by mikeage on 16 Jun 2013 at 3:51

GoogleCodeExporter commented 8 years ago
Issue 89 has been merged into this issue.

Original comment by mikeage on 16 Jun 2013 at 3:51

GoogleCodeExporter commented 8 years ago
Hit me today as well :(

Original comment by pca...@googlemail.com on 17 Jun 2013 at 9:23

GoogleCodeExporter commented 8 years ago
Issue 91 has been merged into this issue.

Original comment by mikeage on 19 Jun 2013 at 3:09

GoogleCodeExporter commented 8 years ago
for those wanting to have some kind of twitter display within pidgin/finch you 
can
install & configure bitlbee
register your user name, then add your twitter account & then you point your 
pidgin/finch to localhost/6667

I am currently using this as a way to get twitter within pidgin ;)

bitlbee is a multi protocol server which uses an irc interface but can be 
configured to connect to a bunch of protocols

Original comment by t...@tomsbox.co.uk on 19 Jun 2013 at 11:10

GoogleCodeExporter commented 8 years ago
FYI: I've started work on a v1.1 client. I don't know if it will get finished, 
but it's starting (details will be posted when ready)

Original comment by mikeage on 24 Jun 2013 at 4:51

GoogleCodeExporter commented 8 years ago
I'm not a C dev, so I'm not sure if I can help with development, but if there's 
anything I *can* do to help, please let me know....

Original comment by cori.sch...@gmail.com on 3 Jul 2013 at 10:33

GoogleCodeExporter commented 8 years ago
Bounty increased to 6BTC......Also, not sure if this helps but api 1.1 has been 
made to work here: 
http://learn.adafruit.com/internet-of-things-printer/download maybe that code 
is of some use as an example implementation of the api??

Original comment by fourt...@gmail.com on 14 Jul 2013 at 5:47

GoogleCodeExporter commented 8 years ago
really 6BTC ?

Original comment by coderworld on 30 Sep 2013 at 12:00

GoogleCodeExporter commented 8 years ago
If I read Mt.Gox right each bit coin is worth about $140 US at the moment so 
times that by six and you get $840US which I think is very generous of someone 
to donate to a project that they wish to see improved.

Original comment by bwmer...@gmail.com on 30 Sep 2013 at 12:27

GoogleCodeExporter commented 8 years ago
I was hoping someone would try to implement this, but I'm getting tired of 
Trillian again and would love to have it working.

It isn't even remotely working, but I started taking a shot at it over at 
https://github.com/dmoonfire/prpltwtr/tree/twitter-json (I know, it's git and 
not hg, but I figured I'll just send a patch later if I can get it working).

At the moment, I'm working with Linux only (autogen.sh). I added json-glib as a 
dependency and got it to pull down the first JSON request (verify) enough to 
get screen name and the like. Sadly, it's blowing up on malloc for the second 
request (friends) so it isn't usable, but at least its a start.

And the code is *horribly* arranged. I'm still groking the code.

If anyone else has a start on this, please tell me because I'd rather not 
duplicate work.

Original comment by d.moonf...@moonfire.us on 1 Oct 2013 at 12:51

GoogleCodeExporter commented 8 years ago
Perhaps you can fork https://github.com/mikeage/prpltwtr instead? 

I started two tasks a few months ago: API 1.1 and a complete reorg of the code. 
Right now I'm at about the same place you are... except that (a) I have Windows 
working as well (which was a complete nightmare to get a version of json-glib 
that works) but (b) I haven't gotten back to it in months.

Original comment by mikeage on 1 Oct 2013 at 1:05

GoogleCodeExporter commented 8 years ago
I just pushed my changes to github. Note that I've been renaming prpltwtr_* and 
twitter_* into a common pt_ . 

note also that I commented out a LOT using #if 0. The current activity is going 
to be a big one, since all of the endpoint code needs to be merged, but once 
that's done, the XML -> JSON switch should be fairly simple (the OAuth stuff 
was pretty easy)

Original comment by mikeage on 1 Oct 2013 at 1:25

GoogleCodeExporter commented 8 years ago
FYI: if this is fixed by the end of January the package might get included in 
Lubuntu and Xubuntu 14.04. Email me at noskcaj@ubuntu.com if this get's fixed.

Original comment by doak.jackson@gmail.com on 3 Oct 2013 at 7:35

GoogleCodeExporter commented 8 years ago
To Coderworld:

Hi There:

Ya really. You need to add a commit to this repository that will restore the 
full functionality that existed before the API 1.0 shutdown. If your name is on 
the commit that make it work you get the coins. So far, others claim to have 
made updates, but on forks not to this repository. So the 6BTC is still up for 
grabs. If more than one person is responcable for the fix, the coins will be 
split as per my discretion.

Regards

Bounty increased to 6.5BTC 10/11/2013 

Original comment by fourt...@gmail.com on 12 Oct 2013 at 2:22

GoogleCodeExporter commented 8 years ago
An additional note:

It would be nice if this was made part of the core or pidgin. As well as a 
standard component in Linux distributions as commenter #17 above posted. Would 
this also be a part of Ubuntu? It would be nice to have on my raspberry pi as 
well. ;-)

Original comment by fourt...@gmail.com on 12 Oct 2013 at 2:30

GoogleCodeExporter commented 8 years ago
Status update. :)

https://github.com/dmoonfire/prpltwtr/tree/twitter-json 

As of end of last week, the code in my repository connect to Twitter, post 
tweets, and gets timeline stuff. There are a good number of bugs (lots of 
duplicates in the chat window) but it builds cleanly on Linux. Mostly, I'm 
tracking things down (but I had to take the week off from development because 
of a novel).

It is forked off mike's master branch, not the refactored branch, mainly 
because I couldn't quite handle that many changes in a single shot.

Original comment by d.moonf...@moonfire.us on 12 Oct 2013 at 2:34

GoogleCodeExporter commented 8 years ago
https://github.com/dmoonfire/prpltwtr

Been a few weeks and figured I'd give an update. At the moment, it is fairly 
solid about connecting to the timeline, posting, and answering. The directed 
messages windows seems to all work without a problem.

I got rid of all the duplicates in the message chat, switched over to 
string-based IDs instead of the numeric because I was getting rounding errors, 
and lots of little things to get the JSON formatting working.

At the moment, these are the things I have doubts or haven't figured out:

1. I probably just broke StatusNet compatibility with a few URL path fragments 
changing

2. I'm pretty sure there is a memory leak somewhere, but I haven't proven it 
one way or the other

3. Search lists doesn't seem to be working

4. I haven't tried to get the Windows side working

5. I have a lot of printf-style debugging lines to remove :)

The short version: it works well enough for my day-to-day activity, but I 
haven't explored the full depths to find all the bugs.

Original comment by d.moonf...@moonfire.us on 14 Nov 2013 at 1:42

GoogleCodeExporter commented 8 years ago
A quick update: I pulled this code and added some more fixes for fetching 
replies and DMs. Basic functionality is definitely back. Replies are not yet 
threaded, and favorites don't work; also searches and lists aren't handled 
properly. But they will be, soon.

Check out http://github.com/mikeage/prpltwtr for the latest. Testing is 
appreciated; patches are appreciated even more :)

Original comment by mikeage on 11 Dec 2013 at 3:46

GoogleCodeExporter commented 8 years ago
Replies are handled correctly, lists seem to work. Search is next.

Go check out github!

Original comment by mikeage on 17 Dec 2013 at 2:56

GoogleCodeExporter commented 8 years ago
And now search is working, though I had to temporarily remove the ability to 
retrieve more than 200 tweets from the home timeline. 

fourthdr -- you still want to offer a reward? ;)

Original comment by mikeage on 18 Dec 2013 at 1:48

GoogleCodeExporter commented 8 years ago
An interesting issue i've noted, but when using the previous push (2013-12-11)  
and replies were received, they would show up as separate chat windows...  
Multiple times.  Sometimes they would recur a half-dozen or more times.

That might have been because i set 'refresh replies'  to every 10 minutes, but 
I'm not sure why they'd be showing multiple times...

Just updated to today's release, so I'll give that a try.

At the very least, it hasn't been crashing!

Original comment by ak.hep...@gmail.com on 18 Dec 2013 at 5:47

GoogleCodeExporter commented 8 years ago
It's fixed. Note that the current version will get you rate limited very 
quickly (there's a bug where the same endpoint is requested over and over; give 
me a few minutes to test the fix before taking another version :)

Original comment by mikeage on 18 Dec 2013 at 5:48

GoogleCodeExporter commented 8 years ago
pushed. no more rate limiting :)

known issues: no more than ~200 old tweets can be received, from timelines, 
replies, DMs, or searches. 

Other than that... I _think_ everything works, but I haven't really tested it.

Because the rate limits are 15 requests / 15 minutes, I recommend setting 
replies, DMs, and home refresh to 2 minutes. 1 is technically possible, but 
very borderline.

Original comment by mikeage on 18 Dec 2013 at 6:00

GoogleCodeExporter commented 8 years ago
Just pulled  your fixes, giving it a try.

Original comment by ak.hep...@gmail.com on 18 Dec 2013 at 6:14

GoogleCodeExporter commented 8 years ago
I've got my home timeline set at 2 minutes, and everything else >5 minutes, but 
I'm still getting rate-limited.

question:  from the '*'  link/menu, for the "reply-all"  action, is it possible 
to build that from within the main chat-window, and not sub out to a new tab? 

Original comment by ak.hep...@gmail.com on 19 Dec 2013 at 1:06

GoogleCodeExporter commented 8 years ago
do you know which request is being rate limited? right now, prpltwtr disables 
the entire account, which is overkill.

regarding the replies, both reply and reply-all open new tabs since it's a 
conversation; that's been the prpltwtr model since day 1. I suppose I can add 
some options to disable it, but not right now; add an issue to the github page 
and I'll try to get to it later.

Original comment by mikeage on 19 Dec 2013 at 2:19

GoogleCodeExporter commented 8 years ago
Here's my refresh settings:
timeline: 2
replies: 10
direct: 10
lists: 60
friends: 60
search: 10

Just got kicked again for rate-limit issues, so i'm going to bump timeline up 
to 3 and see if that helps...

I'm not really tweeting that often, either.  :-(

Original comment by ak.hep...@gmail.com on 19 Dec 2013 at 8:41

GoogleCodeExporter commented 8 years ago
Interesting; can you send me a log file? I've been running since the last 
commit, and haven't had any rate limiting problems. 

Is your connection good? Frequent disconnects could explain this.

Original comment by mikeage on 20 Dec 2013 at 4:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Should be rock solid, as my connection is pretty much  
"one-hop-to-the-internet"  and I work for the ISP as a network engineer...

From my perspective, it almost looks as if the  delay for updates isn't being 
honored.

How would you like me to take the logfile for you?

Original comment by ak.hep...@gmail.com on 20 Dec 2013 at 5:47

GoogleCodeExporter commented 8 years ago
You can either run pidgin -d and save to a file, or use help->debug. The first 
is better, since it will capture from the start.

Which delay? I don't parse the results of x-rate-limit-reset yet, so we're kind 
of hoping that it doesn't overload the system. 

Originally, prpltwtr tried to retreive as many back tweets as it could on 
connect; that could be up to 4 calls in one session, so if you were updating 
every 2 minutes, you could theoretically hit 4 + ceil(15/2) = 12 calls in a 15 
minute window (and with a 1 minute, 19, which is too much), but now it only 
takes the first response, so it should never be more than 8 calls per 15 minute 
window.

The log will let me see which call is giving the 429 (rate limit exceeded); 
it's not contained in the print, but we can see from which callback comes in 
the next line. 

You can email me the log, or upload it to pastebin (although if you can move 
this to a github issue, it might be best); it won't have your password but it 
will have oauth information, so you might want to email it privately or scrub 
those out.

Original comment by mikeage on 20 Dec 2013 at 7:21

GoogleCodeExporter commented 8 years ago
work twitter
no work statusnet

https://twitter.com/mamalibre/statuses/413922161129451520

in debian 7.3

Original comment by mama21ma...@gmail.com on 20 Dec 2013 at 7:48

GoogleCodeExporter commented 8 years ago
I really appreciate the effort that's been put into fixing this thanks! One 
question. When the Home Timeline shows up, each tweet shows an annoying 
prpltwtr:///actions?account=.... at the end. Can I disable this?

Original comment by sam.ming...@gmail.com on 20 Dec 2013 at 2:58

GoogleCodeExporter commented 8 years ago
I think this is the relevant section of the debug log:

(08:18:05) prpl-twitter: BEGIN: twitter_timeline_timeout 
ak_hepcat@api.twitter.com
(08:18:05) prpltwtr: twitter_timeline_timeout: preparing to send to 
twitter_send_format_request_multipage_cb: 414081848994955264
(08:18:05) prpl-twitter: twitter_timeline_timeout: Retrieving 
ak_hepcat@api.twitter.com statuses since 414081848994955264
(08:18:05) prpl-twitter: twitter_api_get_all_since
(08:18:05) prpl-twitter: BEGIN: twitter_send_format_request_multipage_all
(08:18:05) prpl-twitter: twitter_send_format_request_multipage_do: page: 1
(08:18:05) prpl-twitter: Sending GET request to: 
http://api.twitter.com/1.1/statuses/home_timeline.json?count=150
(08:18:05) util: requesting to fetch a URL   
(08:18:05) util: request constructed
(08:18:06) util: Response headers: 'HTTP/1.0 429 Client Error (429)
Via: 1.0 tinyproxy (tinyproxy/1.9.0)
x-rate-limit-reset: 1387559871
content-type: application/json; charset=utf-8
server: tfe
x-rate-limit-limit: 15
date: Fri, 20 Dec 2013 17:17:51 UTC
set-cookie: guest_id=xxxxxxxx; Domain=.twitter.com; Path=/; Expires=Sun, 
20-Dec-2015 17:17:51 UTC
content-length: 56
x-rate-limit-remaining: 0

'
(08:18:06) util: parsed 56
(08:18:06) prpl-twitter: 
twitter_get_home_timeline_all_error_cb(0x7f5e5078f200): Status code: 429
(08:18:06) prpl-twitter: post_failed called for account 
ak_hepcat@api.twitter.com, error 6, message Status code: 429
(08:18:06) connection: Connection error on 0x7f5e4e4cb3c0 (reason: 2 
description: Rate limited)
(08:18:06) jabber: jabber_actions: have pep: NO
(08:18:06) account: Disconnecting account ak_hepcat@api.twitter.com 
(0x7f5e4e12d0c0)
(08:18:06) connection: Disconnecting connection 0x7f5e4e4cb3c0

Original comment by ak.hep...@gmail.com on 20 Dec 2013 at 5:21

GoogleCodeExporter commented 8 years ago
Interesting, i think my issue is that I'd been setting my refresh preferences 
via the advanced tab under the account management.

But i discovered that a right-click on the "chat"  would also show me a dialog 
to set the refresh rate.   So, I changed it there as well, and now it's not 
rate-limiting.

So... why are there two places for the timeline refresh?  Or are they subtly 
different?

Original comment by ak.hep...@gmail.com on 21 Dec 2013 at 7:57

GoogleCodeExporter commented 8 years ago
That's strange; I didn't realize there were two places! I'd have loved to see 
yours accounts.xml between the two changes, but it's a bit late for that now.

I have no idea why the two exist and how they interact. I guess I have some 
homework to do now :)

Regarding the prpltwtr:// link, you might want to consider enabling the 
gtkprpltwtr plugin; it gives you a LOT of nice options (reply, reply-all, 
favorite, RT, mark as spam) that are possible with a GUI client like pidgin. It 
should have been enabled by default, but there was an earlier version (post the 
twitter-json branch) that didn't load, and that might have blocked it from 
retrying the auto enable.

In general, can I ask you to take any future issues (and I suspect there will 
be some <g>) to the github issues page? Thanks!

Original comment by mikeage on 21 Dec 2013 at 3:52

GoogleCodeExporter commented 8 years ago
mikage said: "And now search is working, though I had to temporarily remove the 
ability to retrieve more than 200 tweets from the home timeline. 

fourthdr -- you still want to offer a reward? ;)"

It's now a new year and I still don't see any install for this plugin anywhere. 
I also don't see any on github.

Original comment by fourt...@gmail.com on 10 Jan 2014 at 10:56

GoogleCodeExporter commented 8 years ago
package debian 

http://mamalibre.no-ip.org/prpltwtr_0.13-dev_i386.deb
md5sum 06f039e4a71558352c00f86b6e5f188a

Original comment by mama21ma...@gmail.com on 27 Apr 2014 at 11:28

GoogleCodeExporter commented 8 years ago
Hi mama21ma....:

Do you have a windows binary? Or build directions for a windows version?

Thanks!

Original comment by fourt...@gmail.com on 20 May 2014 at 8:26

GoogleCodeExporter commented 8 years ago
Sorry. I used Windows.

Original comment by mama21ma...@gmail.com on 20 May 2014 at 9:15

GoogleCodeExporter commented 8 years ago
Any progress?  Would love to get back on Twitter.  I refuse to use their 
clients. Prpltwtr on Pidgin or broke. ;)  Would appreciate a windows build.

Original comment by mektek@gmail.com on 23 Aug 2014 at 8:58

GoogleCodeExporter commented 8 years ago
I've checked in every day for the past year to see if a cross-platform version 
of this project had been written.  Today is the last day I do that.

I declare it officially dead.

Original comment by dbrunk...@gmail.com on 24 Aug 2015 at 12:30

GoogleCodeExporter commented 8 years ago
Thunderbird has twitter support and supports many chat protocols out of the box.

Original comment by bwmer...@gmail.com on 24 Aug 2015 at 12:47