Announcement Announcement Module
Collapse
No announcement yet.
Adding picture to twitter post Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding picture to twitter post

    I have already figured out how to post tweets to my twitter timeline. Can someone help me to figure out how to add an image to my tweets?

  • #2
    Hi!

    I'm not well with Twitter (yet ), but it looks like you want to use TimelineOperations.updateStatus(String status, Resource photo).
    So, you can simple use TwitterTemplate directly in some endpoint:
    HTML Code:
    <outbound-channel-adapter channel="updateStatusChannel" expression="@twitterTemplate.timelineOperations().updateStatus(payload, headers.image)"/>
    Is it what are you looking for?

    If I am right, feel free to open improvement issue: https://jira.springsource.org/browse/INT.
    IMO this feature should be avaliable out-of-box in the Framework.

    And keep in mind: we always happy to see any contributions: https://github.com/SpringSource/spri...ONTRIBUTING.md

    Take care,
    Artem

    Comment


    • #3
      That is exactly what I'm looking for. Just to get it straight it's:
      timelineoperations.updatestatus("mytweetstring", "myimage.png")
      ?

      Comment


      • #4
        Hi!
        timelineoperations.updatestatus("mytweetstring", "myimage.png")
        Didn't understand you: was it a question?
        Just use that method directly: that's all.
        Raise an "New feature" issue and we'll think what we can do in the Framework.
        Thanks.
        BTW, recently we upgraded to the Twitter API v1.1 in the 3.0.M3: https://github.com/SpringSource/spri...ation/pull/816

        Comment


        • #5
          How would I convert the image URL to a resource photo?

          Comment


          • #6
            How would I convert the image URL to a resource photo?
            org.springframework.core.io.UrlResource

            Cheers

            Comment


            • #7
              Originally posted by Cleric View Post
              org.springframework.core.io.UrlResource
              Im not seeing that. Here is what I have:

              Dim MyTweet As String = "mytweet"
              Dim MyTweetImage As Spring.IO.FileResource = New Spring.IO.FileResource("myimage.png")
              twitter.TimelineOperations.UpdateStatus(TweetStrin g, ArticleImage.Uri)

              What am I doing wrong?

              Comment


              • #8
                M-m-m...
                Is it .NET?
                Sorry I don't understand your code.

                Comment


                • #9
                  Yes, VB.net

                  Comment


                  • #10
                    Can anyone help?

                    Comment


                    • #11
                      Why are you asking a VB.NET question on a Spring Integration (Java) Forum?

                      Comment


                      • #12
                        Because nowhere does is say this a java forum. All I see is Forum>Spring Projects>Integration>Adding picture to twitter post. Can you point me in the right direction?

                        Comment


                        • #13
                          Which Spring projects are you using in your application?

                          Comment


                          • #14
                            I'm not sure what project it is but here are the dll's I'm using:
                            Spring.Rest.dll version 1.1.1.35020
                            Spring.Social.dll version 1.0.1.35120
                            Spring.Social.Twitter.dll version 2.0.0.3920

                            Comment


                            • #15
                              I was not aware of those windows libraries. In any case, this forum is for the Spring Integration Project and not for general Spring "Integration" issues.

                              I'll see if I can find out where you can help with those libraries.

                              Comment

                              Working...
                              X