Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

problem on GAE #4

Closed
denlab opened this Issue · 4 comments

2 participants

@denlab

Hi,

Great lib, works fine locally. But when deployed on GAE, https doesn't works (javax.net.ssl.HttpsURLConnection is a restricted class).
So I swiched to regular http:

(twitter/with-oauth

instead of :

(twitter/with-https
(twitter/with-oauth

In fact even if I only :require the twitter lib without using it, it breaks.

Here's the stacktrace: https://gist.github.com/973086

A solution could be to use HttpConnection instead of HttpsConnection, the former is on the GAE whitelist.

Any hints ?

thx

Denis

@denlab

I forgot: even with regular http it still breaks, as if httpsconnection was loaded anyway

@mattrepl
Owner

This I'm going to fix by changing how the lib works. The lib should allow you to inject your own base fetch function. Are you able to hack up a workaround in the meantime?

@denlab

Well the workaround was to fall back to using a java lib (shame on me! :)
It's twitter4j, it is GAE-proof, and I needed 2 lines to call it:

(:import (twitter4j TwitterFactory Query)))

;; raw results from twitter
(def raw-results (.search (.getInstance (TwitterFactory.))
(Query. "#sfeir")))

see: https://github.com/denlab/twitalyse/blob/master/src/twitalyse/twitter.clj

Denis

@mattrepl
Owner

Heh, glad you got something working. Until I get to the refactor I mentioned above, twitter4j is a good alternative.

@mattrepl mattrepl closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.