Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12838

Camel Twitter Send Direct Message Endpoint not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.22.1
    • Fix Version/s: 2.21.3, 2.22.2, 2.23.0
    • Component/s: camel-twitter
    • Labels:
      None

      Description

      There has been a change in twitter APIs. On September 17^th^, twitter discontinued the legacy direct message endpoints.

      https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/guides/direct-message-migration.html

      There are three sendDirectMessage methods provided by twitter4j API.

      http://twitter4j.org/oldjavadocs/4.0.7/twitter4j/api/DirectMessagesResources.html#sendDirectMessage(long,%20java.lang.String,%20long)

       

       

      DirectMessage sendDirectMessage(long userId, java.lang.String text)
      Sends a new direct message to the specified user from the authenticating user.
      DirectMessage sendDirectMessage(long userId, java.lang.String text, long mediaId)
      Sends a new direct message to the specified user from the authenticating user.
      DirectMessage sendDirectMessage(java.lang.String screenName, java.lang.String text)
      Sends a new direct message to the specified user from the authenticating user.

       

      The first two methods use the new endpoints(direct_messages/events/new), while the third one uses the old APIs(direct_messages/new)

       

       

      Camel twitter component uses the third method to send direct message (using screen name).

      https://github.com/apache/camel/blob/master/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/directmessage/DirectMessageProducer.java

       

      This needs to be changed in order to support direct message sending to twitter

       

        Attachments

          Activity

            People

            • Assignee:
              acosentino Andrea Cosentino
              Reporter:
              sms0070 SUYASH MANI SHARMA
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified