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

  • Using Spring Social Project

    Hi All,

    In my application scope i need to implement daemons which collect users data from social networks...
    the thing is that i don't need the full flow as described in the spring social project overview my assumption is that i already have the users OAuth token for each specific service provider lets assume that it can be fetched from my DB..

    my question is where and how i intercept the common flow ( which is starting at get the OAuth token and save it using repository connection) and what are the minimal dependencies that i need for my implementation?

    Thanks
    Assaf

  • #2
    The connection flow is useful for the common case where the app does not yet have the access token and needs to engage the user to obtain it. But if you already have it, then you can skip all of that and go straight to constructing the API bindings for yourself.

    For example, if you already have a user's access token for Facebook, you'll just need to use it when constructing a FacebookTemplate:

    Code:
    Facebook facebook = new FacebookTemplate(accessToken);
    Is that what you were looking for?

    Comment


    • #3
      Hi thank you for the quick response....

      the reason that i am asking is because in my application the authentication flow to the various social networks is not handled by my data collector module... so i can assume i already have an access token so i need something to only pass the access token and start fetching data i guess this is exactly what Facebook Template instance does if i understand correctly? the thing is if in all the spring social extension exist something like that Template, for example in Twitter i could not find Twitter Template ....


      one more thing i would like to ask... when social network change her API add / remove and so does the change will be reflected here in spring social projects , or i guess it is depend on us to update it?

      because i searched in github for spring social extensions and i found extensions for many social networks , does there is a list somewhere to official extensions which checked by spring social core developers ?

      Thanks

      Comment


      • #4
        Yes, there is a TwitterTemplate, LinkedInTemplate, etc...for all other provider modules. The constructors for TwitterTemplate and LinkedInTemplate are a bit more involved, requiring not only the access token, but also the consumer key and secret...that's because those are OAuth 1.0a-based and the consumer key and secret are needed along with the access token when signing requests...the access token alone isn't enough.

        I'm unclear on what you're asking in the 2nd question. Could you please re-ask?

        There are a lot of Spring Social extension projects, as listed on the Spring Social home page (http://springsource.org/spring-social). The ones we manage directly are:
        - Spring Social Facebook
        - Spring Social Twitter
        - Spring Social LinkedIn
        - Spring Social TripIt
        - Spring Social GitHub

        All others are community-driven projects. We try (as much as is reasonable) to keep our stuff up to date with whatever changes are made in the provider APIs. As for the community-driven projects, I can't speak to how well those are maintained...but if there's one you are interested in, you can certainly contact the project owner or submit pull requests to help them out. Is that what you were asking?

        Comment


        • #5
          Thanks again... actually i think you have answered all my questions until now and thank you for that...

          can you please make clear to me what are the benefits am i acquiring if i adopt spring social framework to my project which is data fetching from SN which is not involve in the authentication process , get as input all the required information in order to use the SN API ( access token in simple form ) on behalf of the user...? what are the minimum required dependencies i need? as this not as to be a web application in order to use spring social, correct me if i wrong.

          I have another question ... i am sorry in advance if it is not the right place to post questions related to the social networks API's ... but i wonder if any of the SN which you have listed above provide an API to question if the authenticated User state is updated since a given time stamp regarding.. lets say his profile , friends , check ins and so..?

          Thanks Assaf

          Comment


          • #6
            If I am understanding your question correctly, you are wondering what benefit Spring Social brings to an application that will not use it for authentication or authorization. Are you suggesting that your application will obtain an access token via other means? In that case, the key thing that Spring Social offers are Java bindings to the APIs so that you can work with those APIs in Java terms instead of consuming them and doing your own binding operations. You also seem to suggest that the application in question is not a web application; that's fine, but what kind of application is it? We have samples of using Spring Social within an Android app alongside Spring for Android.

            Comment


            • #7
              Thank you for that it is very clear... there is a chance to get an answer on the other question which mentioned in the previous post?

              Comment


              • #8
                Regarding whether there is an API you can use to check to see if the user data has changed since a certain time, there's not much in that regard. Some of the provider APIs have endpoints that let you fetch things like status updates since a given time, but there are very few of those. Others, such as Twitter's timeline endpoints, let you fetch status updates that have been made since a given status update. And, Facebook has real-time updates where Facebook notifies you (via an endpoint on your site) when certain data is updated.

                But in general, I don't see much where you can ask whether or not a user's profile, checkins, etc have changed.

                Comment

                Working...
                X