[
https://issues.apache.org/jira/browse/CAMEL-12838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16631491#comment-16631491
]
Andrea Cosentino edited comment on CAMEL-12838 at 9/28/18 7:53 AM:
-------------------------------------------------------------------
I consider this fixed since it's tested and it works.
Also the fact that the API is not working as expected it's because the library
still use an old endpoint, but Camel, inside, is calling a method pointing to
the new endpoint, so I don't know what you're hitting but probably you're not
using the last version and you're doing something wrong.
was (Author: ancosen):
I consider this fixed since it's tested and it works.
> Camel Twitter Send Direct Message Endpoint not working
> ------------------------------------------------------
>
> Key: CAMEL-12838
> URL: https://issues.apache.org/jira/browse/CAMEL-12838
> Project: Camel
> Issue Type: Bug
> Components: camel-twitter
> Affects Versions: 2.22.1
> Reporter: SUYASH MANI SHARMA
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 2.21.3, 2.22.2, 2.23.0
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> 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*|http://twitter4j.org/javadoc/twitter4j/DirectMessage.html]|*[sendDirectMessage|http://twitter4j.org/javadoc/twitter4j/api/DirectMessagesResources.html#sendDirectMessage-long-java.lang.String-]*(long
> userId, java.lang.String text)
> Sends a new direct message to the specified user from the authenticating
> user.|
> |[*DirectMessage*|http://twitter4j.org/javadoc/twitter4j/DirectMessage.html]|*[sendDirectMessage|http://twitter4j.org/javadoc/twitter4j/api/DirectMessagesResources.html#sendDirectMessage-long-java.lang.String-long-]*(long
> userId, java.lang.String text, long mediaId)
> Sends a new direct message to the specified user from the authenticating
> user.|
> |[*DirectMessage*|http://twitter4j.org/javadoc/twitter4j/DirectMessage.html]|*[sendDirectMessage|http://twitter4j.org/javadoc/twitter4j/api/DirectMessagesResources.html#sendDirectMessage-java.lang.String-java.lang.String-]*(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|https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event]),
> while the third one uses the old
> APIs([direct_messages/new|https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-message])
>
>
> 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
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)