Results 1 to 4 of 4

Thread: No getMiddleName() in Spring Social Facebook?

  1. #1
    Join Date
    Feb 2008
    Posts
    169

    Question No getMiddleName() in Spring Social Facebook?

    How do I get someone's middle name? FacebookProfile.getMiddleName() doesn't exist for some reason.

  2. #2
    Join Date
    Aug 2004
    Posts
    1,072

    Default

    You're correct...there is no getMiddleName() method, but there should be. I just checked the documentation at Facebook and saw the middle_name field, although I have been through that document several times before, including one pass where I specifically set out to fill out FacebookProfile with more fields, and never noticed it. I either overlooked it before, or it was one of those fields that previously wasn't documented but was added when Facebook went through their recent documentation updates. In any event, I've created https://jira.springsource.org/browse/SOCIALFB-29 to track this.
    Craig Walls
    Spring Social Project Lead

  3. #3
    Join Date
    Feb 2008
    Posts
    169

    Default

    You are really fast at responding Craig! Thanks. What is the difference between facebookProfile.getName() and .getFirstName() + .getMiddleName() (when implemented) + .getLastName()? Might it be different in some cases?

  4. #4
    Join Date
    Aug 2004
    Posts
    1,072

    Default

    I don't think there is any difference, but I don't know for certain. That's because getName() isn't implemented as you described. The Facebook profile record has a "name" field (as well as "first_name", "middle_name", and "last_name" fields). The getName() field gets its data from the "name" field returned from Facebook. I can only assume that Facebook implements it as you described.

    Following up on my earlier comments: Facebook recently rewrote almost all of their documentation, updating it to reflect the current state of the platform. There were several places where the documentation was missing things (perhaps "middle_name" was one of those things) or even a few places that were completely incorrect. They announced at F8 Hack last week that all of the documentation had now been rewritten (with only a few small exceptions in cases where they intend to deprecate something), so there are likely a few more fields somewhere that Facebook sends back but that Spring Social Facebook doesn't capture or expose in its API binding. There may even be places where there are endpoints in Facebook's graph API that we're not exposing (I just discovered User/mutualfriends late last week). If you find any more of these, please let me know or open an issue in JIRA to request that they be added.
    Craig Walls
    Spring Social Project Lead

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •