You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (JIRA)" <ji...@apache.org> on 2018/09/28 07:36:01 UTC

[jira] [Comment Edited] (CAMEL-12838) Camel Twitter Send Direct Message Endpoint not working

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

Andrea Cosentino edited comment on CAMEL-12838 at 9/28/18 7:35 AM:
-------------------------------------------------------------------

You are wrong. I moved the implementation to use a method in the library using the new endpoint. So this is fixed and already tested. If you want to have a test, you can build camel-twitter 2.23.0-SNAPSHOT and try to send a direct-message


was (Author: ancosen):
You are wrong. I move the implementation to use a method in the library using the new endpoint. So this is fixed and already tested. If you want to have a test, you can build camel-twitter 2.23.0-SNAPSHOT and try to send a direct-message

> 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)