Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
Ashutosh #1
User title: Vb.Net Programmer
Member since Aug 2011 · 2 posts · Location: bangalore
Group memberships: Members
Show profile · Link to this post
Subject: Retrieving avtar from facebook presence.
I am trying to get avtar for the friends online on facebook. I am using agxmpp for this and still have not succeeded. The presence which i recieve from the facebook  contains base 64 sting in the photo tag. How to use is to retrieve the avtar?
---Ashutosh
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Did you try to request the vcard and look there at the photo?
Can you post a presence with the base64?

Alex
Avatar
Ashutosh #3
User title: Vb.Net Programmer
Member since Aug 2011 · 2 posts · Location: bangalore
Group memberships: Members
Show profile · Link to this post
  1. <presence
  2.    from="-667232748@chat.facebook.com"
  3.    to="iamashutoshks@@chat.facebook.com">
  4.       <x xmlns="vcard-temp:x:update">
  5.          <photo>363c4164c2c81a3dadd01eeed9fa4226207cce9d</photo>
  6.       </x>
  7. </presence>

this is what i recieve from facebook after successful log in.
And so i would like to know how to retrieve photo using the above presence.
---Ashutosh
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this is a hash, no base64.

The photo is in the vcard, the hash is a hash of the binary photo. You should cache the hash, and whenenver the hash changes you know that the photo changed and can request it from the vcard again.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS