import evolution
from facebook import Facebook, FacebookError
import twitter
+import unicodedata
import gnome.gconf
from contacts import ContactStore
import names
# Get the list of friends...
attrs = ['uid', 'name', 'pic_big', 'birthday_date', 'profile_url']
for friend in self.fb.users.getInfo(self.fb.friends.get(), attrs):
- friend['pic'] = friend[attrs[2]]
+ friend['name'] = unicodedata.normalize('NFKD', unicode(friend['name']))
+ friend['pic'] = friend[attrs[2]]
self.friends[friend['name']] = friend
if not friend['pic']:
self.blocked_pictures.append(friend)
api = twitter.Api(username=user, password=passwd)
users = api.GetFriends()
for friend in api.GetFriends():
- self.friends[friend.name] = {'name': friend.name, 'pic': friend.profile_image_url, 'birthday_date': None, 'twitter_url': 'http://twitter.com/%s' % (friend.screen_name), 'homepage' : friend.url}
+ self.friends[friend.name] = {'name': unicodedata.normalize('NFKD', unicode(friend.name)), 'pic': friend.profile_image_url, 'birthday_date': None, 'twitter_url': 'http://twitter.com/%s' % (friend.screen_name), 'homepage' : friend.url}
# TODO What if the user has *no* contacts?