Active Topics

 



Notices


Reply
Thread Tools
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#111
Originally Posted by Legis View Post
some of my facebook friend use non-English as his name, ex: Chinese, and it seems Hermes could not fetch all Chinese facebook friend.
The names to try to get normalised from UTF-8 to homoglyphs, but I don't know how well it'd work for Chinese characters. Probably very badly.

If you're comfortable with X Terminal, I could send you some code so we can see what Facebook sends (in terms of bytes) and what Contacts reports (in terms of bytes).

BTW, if I register account to garage.maemo.org, could I snap the Hermes source code? If yes, maybe I could have chance to check this when I'm free...:P
To download it you don't even need a Garage account, just git pull from the master:

https://garage.maemo.org/scm/?group_id=1071

The current HEAD is in a bit of a broken state whilst Fredrik Wendt and I work on a large scale refactoring of the current services to better adapt to services which have had code hacked in like LinkedIn, Gravatar and Hyves; and future services like Plaxo, Orkut etc; however names.py is where identifier normalisation happens.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 
Posts: 20 | Thanked: 0 times | Joined on Oct 2009
#112
Originally Posted by Jaffa View Post
The names to try to get normalised from UTF-8 to homoglyphs, but I don't know how well it'd work for Chinese characters. Probably very badly.

If you're comfortable with X Terminal, I could send you some code so we can see what Facebook sends (in terms of bytes) and what Contacts reports (in terms of bytes).
No problem, please send to me.

But I add " print friend[attrs[1]]" in lib/hermes.py

# Get the list of friends...
attrs = ['uid', 'name', 'pic_big', 'birthday_date', 'profile_url', 'first_name', 'last_name', 'website']
for friend in self.fb.users.getInfo(self.fb.friends.get(), attrs):
print friend[attrs[1]] ## Legis
key = unicode(friend['name']).encode('trans')
self.friends[key] = friend
self.friends_by_url[friend['profile_url']] = friend
friend['pic'] = friend[attrs[2]]
friend['account'] = 'facebook'
if friend['website']:
friend['homepage'] = friend['website']
if not friend['pic']:
self.blocked_pictures.append(friend)

The name is correct. Still check...should be key issue.


Originally Posted by Jaffa View Post
To download it you don't even need a Garage account, just git pull from the master:

https://garage.maemo.org/scm/?group_id=1071

The current HEAD is in a bit of a broken state whilst Fredrik Wendt and I work on a large scale refactoring of the current services to better adapt to services which have had code hacked in like LinkedIn, Gravatar and Hyves; and future services like Plaxo, Orkut etc; however names.py is where identifier normalisation happens.
What is the difference between the code on git and the code on N900?

Last edited by Legis; 2010-01-19 at 03:52.
 
Posts: 20 | Thanked: 0 times | Joined on Oct 2009
#113
I think I find the root cause.

This code --> key = unicode(friend['name']).encode('trans')

lib/trans.py does not provide the encode behavior for Chinese character. So most Chinese is translated into the same ascii code. so overwrite.

So I just modify as "key = friend['name']" or key = friend['uid'] to avoid this. But it does not work for "auto match". You must do it by hand.

So unicode to ascii encode for Chinese is the root cause.
 
Posts: 41 | Thanked: 17 times | Joined on Dec 2009 @ Seattle, WA
#114
Originally Posted by Jaffa View Post
frals is correct. Facebook lets you get the information outlined here: http://wiki.developers.facebook.com/.../Users.getInfo - as far as I can tell, the only useful information here is picture, name, birthday and homepage URLs. Hermes pulls all of that.

If you can find something else useful from that URL, let me know.
Facebook has whitelists to make this possible - for instance, they did this for Android. If I got you on the whitelist, would you add this feature? (To add contact information.)
 

The Following User Says Thank You to natmaster For This Useful Post:
Posts: 318 | Thanked: 49 times | Joined on Nov 2009
#115
Hi

I used hermes to pull contact data from facebook. I noticed though that it does not import people's email addresses from facebook. Is this data unavailable to update via hermes?
 

The Following User Says Thank You to woodyear99 For This Useful Post:
Posts: 5,335 | Thanked: 8,187 times | Joined on Mar 2007 @ Pennsylvania, USA
#116
Originally Posted by woodyear99 View Post
...it does not import people's email addresses from facebook. Is this data unavailable to update via hermes?
The second and third post of this thread explain that Hermes pulls in all the useful information allowed by the Facebook API. Unfortunately, "email address" is not something Facebook offers up.

Other devices that pull in additional information--such as email addresses--do so through some other, private Facebook API. Access to that API would require negotiation with, and likely money given to, Facebook. I'm sure Jaffa would be only to happy to speak with someone about gaining access if anyone here has an "in", but I'm sure he's neither willing nor able to hand over large sacks of money for the privilege, and I don't know if he'd be willing to sign NDAs and take Hermes closed source.
__________________
maemo.org profile
 

The Following User Says Thank You to sjgadsby For This Useful Post:
hawaii's Avatar
Posts: 1,030 | Thanked: 792 times | Joined on Jun 2009
#117
Birthday data doesn't seem to be coming across for me. Any specific reason this might be?

I have enabled new contacts to be created for birthday-only ones, and it pulls and creates contacts just fine.

Last edited by hawaii; 2010-02-04 at 05:27.
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#118
Originally Posted by hawaii View Post
Birthday data doesn't seem to be coming across for me. Any specific reason this might be?

I have enabled new contacts to be created for birthday-only ones, and it pulls and creates contacts just fine.
If it's only some birthdays, the friend may not have exposed their birthday data to third-party applications.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following User Says Thank You to Jaffa For This Useful Post:
Chapbass's Avatar
Posts: 42 | Thanked: 13 times | Joined on Nov 2009 @ Chicago, IL
#119
Originally Posted by natmaster View Post
Facebook has whitelists to make this possible - for instance, they did this for Android. If I got you on the whitelist, would you add this feature? (To add contact information.)
Have we seen any update on this? Looked like Natmaster had the ability to get hermes on the private API.

Also, is it possible to have hermes create new contacts instead of updating the contacts you have? (therefore we would just have to hit "merge" and all of the contacts that aren't in the n900 but ARE on your friends list would be imported)
__________________
Hi! I'm a Maemo Greeter!

Useful links for newcomers: New members say hello , New users start here, Community subforum, Beginners' wiki page, Maemo5 101, Frequently Asked Questions (FAQ)

If I can help with anything else, just ask!


Some days you just can't get rid of a bomb!
 

The Following User Says Thank You to Chapbass For This Useful Post:
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#120
Originally Posted by natmaster View Post
Facebook has whitelists to make this possible - for instance, they did this for Android. If I got you on the whitelist, would you add this feature? (To add contact information.)
Sorry, I didn't see this. Yes, if Hermes is permitted - by Facebook - to add email addresses and phone numbers, I'd *love* to add that feature!
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following 2 Users Say Thank You to Jaffa For This Useful Post:
Reply

Tags
application, birthday, contact, contacts, facebook, fremantle, hermes, information, jaffa, maemo, maemo 5, photo, photos, sync, synchronization, twitter, url, website


 
Forum Jump


All times are GMT. The time now is 13:40.