maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Hermes update request (https://talk.maemo.org/showthread.php?t=90458)

Jaffa 2013-06-28 17:38

Re: Hermes update request
 
Effectively this is bug #12224 (and a few others).

Unfortunately both Facebook and Twitter have changed their APIs. At the moment I have limited time to work on fixes, so it is unlikely to be resolved unless someone else steps up. The code base is Python, quite clean and should be easy to get to grips with, and I'd be happy to advise (as, I'm sure, would Fredrik Wendt who also has done a lot of work on it).

nokiabot 2013-06-29 06:34

Re: Hermes update request
 
any takers:)

shubell 2013-07-29 12:41

Re: Hermes update request
 
miss hermes... :(

gianko 2013-11-09 02:28

Re: Hermes update request
 
taking a look at the code
https://garage.maemo.org/plugins/ggi...56769f;hb=HEAD
should we modify the file api.py to let hermes work again with facebook?

gianko 2013-11-22 14:48

Re: Hermes update request
 
as authorizing facebook from app doesn't work anymore, i got the access token from the url after login and put it in /apps/maemo/hermes via gconftool.

so when i open hermes, facebook appears authorized and i can activate it. but still when trying to retrieve/update contacts info, it gives the connection error message.

this is the same error saw in this bug https://bugs.maemo.org/show_bug.cgi?id=11741

in fact when starting app from terminal with /opt/hermes/bin/hermes >MyDocs/hermes-log.txt 2>&1

i got the same error in the log
Code:

Traceback (most recent call last):
File "/opt/hermes/lib/org/maemo/hermes/gui/gtkui.py", line 135, in sync
hermes.run(force)
File "/opt/hermes/lib/org/maemo/hermes/engine/hermes.py", line 63, in run
service.process_friends()
File "/opt/hermes/lib/org/maemo/hermes/engine/facebook/service.py", line 102, in process_friends
raise e
HTTPError: HTTP Error 400: Bad Request

unfortunately clearing the authorisation and
then reauthorize with facebook don't fix the issue.

i'm wondering if can be something related to facebook page of the app, maybe an old secret key?
also if you go to http://apps.facebook.com/maemohermes/
you will just see the maemo garage page of the project.
is it normal?
you cannot see the line for "fb_sig_ext_perms" as suggested in the bug

i see in the fb app settings about hermes that i made a login but no data acces recorded

any chanche to find a fix?

gianko 2013-11-23 00:30

Re: Hermes update request
 
the log when trying to authorize from hermes with facebook is:

Code:

Nokia-N900 - - [19/Nov/2013 01:00:26] "GET /success?code=****hidden code*****HTTP/1.1" 200 -
Traceback (most recent call last):
  File "/opt/hermes/lib/org/maemo/hermes/engine/facebook/provider.py", line 96, in _handle_button
    self.api.authenticate()
  File "/opt/hermes/lib/org/maemo/hermes/engine/facebook/api.py", line 24, in authenticate
    {'scope': 'user_about_me,friends_about_me,user_birthday,friends_birthday,user_website,friends_website,user_work_history,friends_work_history'})
  File "/opt/hermes/lib/oauth2.py", line 40, in authorise
    result = urllib2.urlopen('%s?client_id=%s&redirect_uri=%s&client_secret=%s&code=%s' % (access_token_url, self._client_id, redirect_uri, self._client_secret, code)).read()
  File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/usr/lib/python2.5/urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.5/urllib2.py", line 425, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/urllib2.py", line 506, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 400: Bad Request


gianko 2013-11-24 01:18

Re: Hermes update request
 
I GOT IT!

I have Hermes connecting and working again with facebook!

it was just a matter of oauth url.

for a quick fix you can login to facebook trough your PC, delete hermes in your apps menu, and then insert this url:

https://www.facebook.com/dialog/oaut...nse_type=token

you will then authorize hermes and be redirected to a page which url contains the access token. (the token can be hidden by the browser but if you go back you can copy it, be fast) i copied the access token and pasted on the N900 via ssh. be carefull not to copy also the "expire" part.

then from terminal set the access token in hermes with command:

gconftool --set /apps/maemo/hermes/facebook_access_token --type string "insert access token here between the quotation marks"

now you should have hermes working with facebook!

btw this long passages can be avoided by upgrading hermes code with the new oauth link and releasing a new version

Jaffa 2013-11-25 00:35

Re: Hermes update request
 
Quote:

Originally Posted by gianko (Post 1388510)
I GOT IT!

I have Hermes connecting and working again with facebook!

it was just a matter of oauth url.

Brilliant, thanks for looking at that. package/src/org/maemo/hermes/engine/facebook/api.py might be where you need to make changes.

gianko 2013-11-25 02:27

Re: Hermes update request
 
some changes needed here too?

package/src/oauth2.py

Jaffa 2013-11-26 00:41

Re: Hermes update request
 
oauth2.py should only need changing if the &request_type=token suffix to the query string is needed.


All times are GMT. The time now is 20:17.

vBulletin® Version 3.8.8