Announcement Announcement Module
Collapse
No announcement yet.
Additional FacebookProfile Fields Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Additional FacebookProfile Fields

    We would like to have the following fields in addition of the existing data fields in the FackbookProfile class. I hope they will be in the M3 release. The FB reference documentation in the regards: http://developers.facebook.com/docs/reference/api/user/

    Requested fields:

    locale
    location

    Nice to have:

    birthday
    relationship_status
    Last edited by vw729; Mar 10th, 2011, 12:21 PM.

  • #2
    Very nice posting really.Link shared is so informative.
    Thanks for this nice link.

    Comment


    • #3
      I absolutely agree with this request.

      I've taken a look at the source code and it seems that it is just a trivial thing to add, just adding some lines in FacebookTemplate.getUserProfile() and some fields in the FacebookProfile class.

      I think a lot of people would benefit from this and it seems to me that it requires just so little work. I could even do it and post the code, unless there's some problems which I'm not aware of.

      Edit: Looking at the fb documentation I see there are permissions involved, so maybe it's not that trivial. If I have some time I'll try to implement this and if it works I'll say something.
      Last edited by 1000i1; Mar 25th, 2011, 02:58 PM.

      Comment


      • #4
        I've taken a look and to have this fields you only have to request permission to get this fields from the user through the login form. So for example to get the location and the birthday you would do:
        Code:
        <fb:login-button perms="email,user_birthday,user_location,publish_stream,offline_access"
        Then add the needed fields in the FacebookProfile class and fetch them in FacebookTemplate.getUserProfile().
        So, if someone really needs them they're quite easy to obtain, although it would really be great if all the fields where added on the next release.

        Comment


        • #5
          I did a lot of work last week to extend what is offered in the Facebook API binding, including adding all of the fields that are available for a user.

          As you pointed out, it's rather easy to add those fields. But to properly test it involves checking to see what should happen if the app doesn't have permission for some piece of data. In most cases, the Graph API just returns nothing (either the field isn't in the JSON or it's an empty data set)...in a few cases you get a 403 response. So, yeah...it's easy to add a field, but testing for all permissions scenarios is a bit more involved.

          I've still got some work to do, so I've not pushed it into Git yet, but it should be there soon.

          Comment


          • #6
            I just tried to get those two fields and I assumed it would be the same with the rest. I see I was wrong . So it's nice to know you're working on this and we'll be able to use this in the near future, so thanks a lot!

            Comment


            • #7
              Originally posted by habuma View Post
              I did a lot of work last week to extend what is offered in the Facebook API binding, including adding all of the fields that are available for a user.

              As you pointed out, it's rather easy to add those fields. But to properly test it involves checking to see what should happen if the app doesn't have permission for some piece of data. In most cases, the Graph API just returns nothing (either the field isn't in the JSON or it's an empty data set)...in a few cases you get a 403 response. So, yeah...it's easy to add a field, but testing for all permissions scenarios is a bit more involved.

              I've still got some work to do, so I've not pushed it into Git yet, but it should be there soon.

              Thanks Craig for looking into this matter.

              When I had a look at FB API, I did notice the permission restriction for many user account fields. It will be great if your API can say what permissions need to be set if your code is unable to obtain a given field data.

              Comment

              Working...
              X