Announcement Announcement Module
No announcement yet.
Spring Social Twitter roadmap / Entities loading Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Social Twitter roadmap / Entities loading

    What is the roadmap for the Spring Social Twitter module?

    I'm especially looking forward for the last month merged feature for retrieving Entities.


  • #2
    As with most/all Spring projects, the roadmap can be viewed in Jira. For Spring Social Twitter specifically, the roadmap can be found at

    Be aware that the roadmap is fluid and subject to shift based on surprises and other workload-impacting events. That said, the current plan (which is still subject to change) is to push a 1.1.0.M1 release on Nov 19th, followed by a 1.1.0.M2 release on or about December 17. Depending on community feedback and what remains in the backlog, either a RC1 or M3 release would follow in January and although dates get fuzzier the further out you look, I anticipate a 1.1.0.RELEASE in plenty of time before Twitter fully removes the 1.0 version of their API in March.

    But once again, these plans are fluid and subject to change.


    • #3
      Thanks Craig for your honest and clear answer.

      For me it's not about the 1.0 api removal by Twitter, but the availability of the object as part of the tweet. It's clear with the timeline you mentioned this will not be available in the short term.



      • #4
        Not so. The entities *are* currently part of the Tweet object and therefore will be in that release. What appears to be missing here is a Jira issue or the presence of such a Jira issue in the roadmap to capture that fact. If it's in the current snapshot release, it will almost certainly be in the 1.1.0.M1 release.

        I'll look into the missing issue in Jira, but I'd appreciate it if you'd have a look at the latest snapshot code and let me know if there's something you are expecting that's not there.


        • #5
          I found this jira issue: (unresolved)
          And I think this functionality was indeed already included in master using this pull request:

          But what I mean is getting the Entities available in a mainstream release won't be before 1.1.0 which GA will be probably somewhere in February following the timeline you mentioned above. And that's what I mean with not in the short term.

          I was hoping this would maybe be backported/included in e.g. a 1.0.x version but I understand this won't be the case.



          • #6
            PS: Is the plain json/xml of the received tweets (by using Search) available through the api? Maybe I can access the Entities via this was then?


            • #7
              You're correct. Adding entities would constitute a "new feature" and we avoid adding new features in a point release unless there's really strong reason to do so. Point releases tend to be primarily for bug fixes or the occasional small-scale enhancement. So, 1.1.0.RELEASE will be the first GA release with entities in it.

              That said, following up on your other question, you can't get the JSON back directly using Spring Social's Twitter binding. But you can call restOperations() to get a RestTemplate that is already setup to add the OAuth Authorization header. From that you can make whatever request you want against Twitter and bind the results to any object you like. That's a good temporary solution until entities are fully supported in 1.1.0.


              • #8
                Yes I think that's a good way forward for now. Thanks for the constructive discussion, much appreciated.

                PS: do you think making the plain json/xml response accessible would be a good option for 1.1.0 as well?
                This would make it always possible for users to get the plain response and do whatever they want with it (e.g. storing it in mongo or processing fields not available in api).



                • #9
                  I can see how it'd be useful, but how do you envision that working? You can only return one thing from a method, so if I'm returning a List<Tweet>, how would I also return the JSON? I mean, I *could* put the JSON for a Tweet into the Tweet, but I'm not sure that's a great idea...and I don't even know where I'd attach it to a List<Tweet>.

                  Even so, as it is I never deal with the JSON anyway. It's all dealt with under the covers by RestTemplate, the JSON message converter, and Jackson. The only way I'd ever be able to get at the JSON is to either make 2 calls (one for the object and another for the JSON) or change the entire API binding to fetch the response as JSON and then do the conversion on my own (which would be a bit much).


                  • #10

                    You are right this won't fit easy in current API. I don't how the internals of the RestTemplate but as you mentioned you are not even touching the json yourself.

                    One way to do it is instead of:

                    SearchResults searchResults = restTemplate.getForObject(buildUri("search/tweets.json", parameters), SearchResults.class);
                    call something like:

                    String json = restTemplate.getForObject(buildUri("search/tweets.json", parameters), String.class);
                    // pseudo code:
                    1. use message converter to convert json to SearchResults (the first call is doing that as well but autmatically)
                    2. enhance each tweet in the search results with the json (partial) from json string
                    But I don't know it's worth the effort.

                    I've implemented a public Java api ( once with json format my self and to provide the plain json my api calls were returning "Response" object containing getters for the actual data per api method, and a generic getJSON getter. Not that is something for Spring Social Twitter, but just wanted to mention.


                    • #11
                      Yes, the 2-step pseudo-code is more or less what I had in mind. It'd be quite laborious to change the API that way, but it could be done. But as you also said, I'm not sure it's worth the effort. And even if I did it with Twitter and Facebook and'd be specific to those modules. Any other community-led effort would have to do it, other words, it's not really a Spring Social-specific feature...just a feature of the API binding.

                      A better approach, in my opinion is this: If you find something missing in the API binding, (1) report it as an improvement issue in JIRA so that I know to attack it (or better yet, submit a pull request along with the JIRA issue)...then (2) in the meantime until it's part of a Spring Social build, call restTemplate() and do the call and binding yourself. Then when it is in a Spring Social build, replace your code with code from the API binding.