[
https://issues.apache.org/jira/browse/CAMEL-12838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16631483#comment-16631483
]
SUYASH MANI SHARMA commented on CAMEL-12838:
--------------------------------------------
Hi,
I have tested after building it for 5 hours just to find that this issue is
still happening.
I know that you are using the method which uses the new endpoint, but API is
not working properly.
Check this issue : [https://github.com/Twitter4J/Twitter4J/issues/297]
Regards,
Suyash
> 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)