Done. in trunk.

On Thursday, 30 May 2013 22:39:10 UTC-5, 黄祥 wrote:
>
> hi,
>
> just want to report that web2py 2.4.7 admin Recent Tweets not loaded.
> error:
> Unable to download because:
> local variable 'r' referenced before assignment
>
> applications/admin/controllers/default.py
> def twitter():
>     session.forget()
>     session._unlock(response)
>     import gluon.tools
>     import gluon.contrib.simplejson as sj
>     try:
>         if TWITTER_HASH:
>             page = urllib.urlopen("
> http://search.twitter.com/search.json?q=%%40%s"; % TWITTER_HASH).read()
>             data = sj.loads(page, encoding="utf-8")['results']
>             d = dict()
>             *r = []*
>             for e in data:
>                 d[e["id"]] = e
>                 r = reversed(sorted(d))
>             return dict(tweets=[d[k] for k in r])
>         else:
>             return 'disabled'
>     except Exception, e:
>         return DIV(T('Unable to download because:'), BR(), str(e))
>
> ref:
> https://groups.google.com/forum/?fromgroups#!topic/web2py/rtUZeamzXp8
>
> error is gone and also not showing any tweets
>
> if i'm not wrong twitter api had already deprecated, imho, if you want to 
> use twitter tweets please use the embeded one provide by twitter 
> (timelines, tweets, etc)
>
> ref:
> https://dev.twitter.com/
>
> please correct and forgive me if i'm wrong
>
> best regards
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to