Announcement Announcement Module
Collapse
No announcement yet.
Accessing Social data Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing Social data

    Hi All,

    this is another, hopefully my last, really simple question, and it relates to best practice using SpringSocial.

    I have setup the LinkedIn integration on a web app that I am developing and having let my users authorize the app to access LinkedIn, I want to use some of the data in the users LinkedIn profile as part of the users public profile on the site.

    Whats the best (practice) approach? everytime someone accesses a users public profile, should the app connect to LinkedIn using the viewed user's (the user whose profile is being viewed) access token etc and retrieve the latest LinkedIn profile data required? or is it better to persist the users linkedIn profile when the viewed user first authorizes the app to use linkedin and then only refresh when the user nexts logs in/requests to update the data?

    Thanks

  • #2
    When fetching a user's data from some other source, it's always best to fetch it frequently to be sure that it's up-to-date. If you were to fetch it once and store it, then it'd be out of date if they decide to update it on whatever source you originally fetched it from. In fact, some providers have it in their terms of use that you shouldn't the data you fetch long-term.

    That said, I'd also avoid making unnecessary remote calls. I think there'd be nothing wrong with doing some sort of caching of the data and only re-fetching once per session, once per day, or some other frequency to avoid making long-term calls. Or you could just use Spring 3.1's support for declarative caching.

    Comment


    • #3
      Perfect. Thanks, I have added Springs declarative caching with ehcache to fetch the data more regularyly.

      Thanks again.

      Comment

      Working...
      X