Reply Twitter with Rest Client (CURL)

Version 1
    This document was generated from CDN thread

    Created by: Selamat Pagi on 18-11-2013 12:23:03 AM
    Social miner 9.0(1)
    Cisco Social Miner Developer Guide, Release 9.0(1).0.2.0.pdf

    I 've tried to post retweet and direct message using rest client ( firefox addons ) and successful but when it will do the reply comment fails and error code 404

    My username which is in setup : myplnuser

    Retweet :
    URL : http://server:port/ccp-webapp/ccp/reply/twitter/statuses/retweettweetId (page 99)
    https://twitter.com/esraldi/statuses/402311970667241472

    XML:
    <Status> 
    <username> myplnuser < / username > 
    <tweetId> 402311970667241472 < / tweetId >
    < / Status >

    Status Code : 202 Accepted - > OK

    Direct Message :

    URL : http://server:port/ccp-webapp/ccp/reply/twitter/direct_messages/new (page 98)

    XML:
    <DirectMessage>
    <fromUsername> myplnuser < / fromUsername >
    <toUsername> @ esraldi < / toUsername >
    <message> This is a test of the API create direct message . < / message >
    < / DirectMessage >

    Status Code : 202 Accepted - > OK

    Create Status :

    URL : http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new (page 97)

    XML:
    <Status>
    <username> myplnuser < / username >
    <message> This is a test of the API create direct message . < / message >
    < / Status >

    Status Code : 404 Not Found - > FAIL

    Is the URL (http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new) wrong ?

    My Capture.


    Subject: RE: Reply Twitter with Rest Client (CURL)
    Replied by: Jeffrey Muller on 18-11-2013 09:32:51 AM
    Yes, the URL you used is incorrect. Please note that it uses “statuses”, not “status”, i.e.: http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new

    Please review the Developer's Guide and let us know if you still have issues.

    Jeff

    Subject: RE: Reply Twitter with Rest Client (CURL)
    Replied by: Selamat Pagi on 21-11-2013 06:11:25 PM
    Jeffrey Muller:
    Yes, the URL you used is incorrect. Please note that it uses “statuses”, not “status”, i.e.: http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new

    Please review the Developer's Guide and let us know if you still have issues.

    Jeff


    I've updated the post, I've been using the url http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new but the error 404 as well .. what is wrong? see photos in my posts

    Subject: RE: Reply Twitter with Rest Client (CURL)
    Replied by: esraldi darmawanto on 24-11-2013 07:18:46 PM
    Selamat Pagi:
    Jeffrey Muller:
    Yes, the URL you used is incorrect. Please note that it uses “statuses”, not “status”, i.e.: http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new

    Please review the Developer's Guide and let us know if you still have issues.

    Jeff


    I've updated the post, I've been using the url http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new but the error 404 as well .. what is wrong? see photos in my posts
    Can u help us about this problem??

    Subject: RE: Reply Twitter with Rest Client (CURL)
    Replied by: Jeffrey Muller on 25-11-2013 11:51:29 AM
    Esraldi,

    Sorry for the delay in responding.

    I checked the API usage against the server, and then looked at the code, and you are correct, the Developer Guide includes an incorrect URL for this particular API.

    The correct URL is http://<server:port>/ccp-webapp/ccp/reply/twitter/statuses/update.

    Sorry for the confusion, and we appreciate your input. We will work to have the documentation corrected. Please let us know if you have any further issues.

    Thanks,
    Jeff

    Subject: RE: Reply Twitter with Rest Client (CURL)
    Replied by: esraldi darmawanto on 25-11-2013 07:10:38 PM
    Jeffrey Muller:
    Esraldi,

    Sorry for the delay in responding.

    I checked the API usage against the server, and then looked at the code, and you are correct, the Developer Guide includes an incorrect URL for this particular API.

    The correct URL is http://<server:port>/ccp-webapp/ccp/reply/twitter/statuses/update.

    Sorry for the confusion, and we appreciate your input. We will work to have the documentation corrected. Please let us know if you have any further issues.

    Thanks,
    Jeff

    thanks for the response jeff, and I have tried, it worked. 1 more question how do we reply to a post / tweet? can be as conversational as in facebook. In the guide document for reply adds inReplyToStatusId parameters, this is social contact? or tweet id? (https://twitter.com/pln_123/status/405140602766913537 -> tweet id is 405140602766913537)

    thx

    Subject: RE: Reply Twitter with Rest Client (CURL)
    Replied by: Jeffrey Muller on 26-11-2013 10:17:17 AM
    The "inReplyToStatusId" parameter refers to the tweet ID (in your example, "405140602766913537"). However, be aware that the inReplyToStatusId parameter is ignored (by Twitter) unless the author of that particular tweet is explicitly mentioned ("@originalAuthor") in the "message" text.

    If you have further difficulties with that, please let us know.

    Jeff

    Subject: RE: Reply Twitter with Rest Client (CURL)
    Replied by: esraldi darmawanto on 19-12-2013 10:30:55 AM
    Selamat Pagi:
    Social miner 9.0(1)
    Cisco Social Miner Developer Guide, Release 9.0(1).0.2.0.pdf

    I 've tried to post retweet and direct message using rest client ( firefox addons ) and successful but when it will do the reply comment fails and error code 404

    My username which is in setup : myplnuser

    Retweet :
    URL : http://server:port/ccp-webapp/ccp/reply/twitter/statuses/retweettweetId (page 99)
    https://twitter.com/esraldi/statuses/402311970667241472

    XML:
    <Status> 
    <username> myplnuser < / username > 
    <tweetId> 402311970667241472 < / tweetId >
    < / Status >

    Status Code : 202 Accepted - > OK

    Direct Message :

    URL : http://server:port/ccp-webapp/ccp/reply/twitter/direct_messages/new (page 98)

    XML:
    <DirectMessage>
    <fromUsername> myplnuser < / fromUsername >
    <toUsername> @ esraldi < / toUsername >
    <message> This is a test of the API create direct message . < / message >
    < / DirectMessage >

    Status Code : 202 Accepted - > OK

    Create Status :

    URL : http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new (page 97)

    XML:
    <Status>
    <username> myplnuser < / username >
    <message> This is a test of the API create direct message . < / message >
    < / Status >

    Status Code : 404 Not Found - > FAIL

    Is the URL (http://server:port/ccp-webapp/ccp/reply/twitter/statuses/new) wrong ?

    My Capture.
    How we can update status social contact to be READ or DISCARD via API? and show the limit posting  twitter

    Subject: RE: Reply Twitter with Rest Client (CURL)
    Replied by: Mark Rzasa on 19-12-2013 03:14:24 PM
    Hi Selamat,

    The ccp/reply/twitter/statuses/new API is documented incorrectly. The correct URL is: http://<socialMiner>/ccp-webapp/ccp/reply/twitter/statuses/update.

    I'm sorry for the inconvenience.

    -Mark