[ 
https://issues.apache.org/jira/browse/CAMEL-12838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16631473#comment-16631473
 ] 

SUYASH MANI SHARMA commented on CAMEL-12838:
--------------------------------------------

Hi,

 

This still doesn't work because of issues in twitter4j APIs.

[https://github.com/Twitter4J/Twitter4J/issues/297]

When they fix it in twitter4j, then version of twitter4j here need to be 
changed.

Right now, this issue is not fixed.

 

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)

Reply via email to