Comments (3)
Interestingly, it's working without semi colon for me! And, another thing to
note is we're using DELETE whereas twitter API page says POST.
Original comment by [email protected]
on 3 Jun 2012 at 9:34
from twitcurl.
Even if this is an old thread, i can't delete tweets still today. i tried first
this:
bool twitCurl::statusDestroyById( std::string& statusId )
{
if( statusId.empty() )
{
return false;
}
/* Prepare URL */
std::string buildUrl = twitCurlDefaults::TWITCURL_PROTOCOLS[m_eProtocolType] +
twitterDefaults::TWITCURL_STATUDESTROY_URL
+ twitCurlDefaults::TWITCURL_COLON // added by me
+ statusId +
twitCurlDefaults::TWITCURL_EXTENSIONFORMATS[m_eApiFormatType];
/* Perform DELETE */
return performDelete( buildUrl );
}
and i get "{"errors":[{"message":"Sorry, that page does not exist","code":34}]}"
when i remove twitCurlDefaults::TWITCURL_PROTOCOLS (what seems to be similiar
to your solution) or twitCurlDefaults::TWITCURL_COLON or both i get
"{"errors":[{"message":"Could not authenticate you","code":32}]}". And if i
replace performDelete by performPost what should be right according to REST API
i get bad request errors. Any ideas?
PS: Maybe i haven't got enough oAuth knowledge, do i have to authorize my app
in some kind for every delete operation or is this done automatically by
twitcurl? (So if you ask: Yes i did authorize my app at twitter and in my
account, because i can successfully post tweets and get my user_timeline, but
just cannot delete tweets)
Original comment by [email protected]
on 14 Oct 2014 at 1:46
from twitcurl.
if anyone is still interested in this, i solved my problem after trial and
error with this method:
bool twitCurl::statusDestroyById( std::string& statusId )
{
if( statusId.empty() )
{
return false;
}
std::string msgToPost = "id=" + statusId;
/* Prepare URL */
std::string buildUrl = twitCurlDefaults::TWITCURL_PROTOCOLS[m_eProtocolType] +
twitterDefaults::TWITCURL_STATUDESTROY_URL
//+ twitCurlDefaults::TWITCURL_COLON // not added by me
+ statusId +
twitCurlDefaults::TWITCURL_EXTENSIONFORMATS[m_eApiFormatType];
/* Perform POST */
return performPost( buildUrl, msgToPost );
}
I think this results in a request like this:
POST https://api.twitter.com/1.1/statuses/destroy/12345678.json?id=12345678
what seems to be redundant and not like in the documentation (which says to use
a colon first but has none in the example
https://dev.twitter.com/rest/reference/post/statuses/destroy/%3Aid )
Original comment by [email protected]
on 20 Oct 2014 at 1:07
from twitcurl.
Related Issues (20)
- Conflict between base64 in twitcurl and libcurl
- How to get tweets that don't contain chosen words?
- how to upload media
- TWITCURL_MENTIONS_URL in twitcurlurls.h should be statuses/mentions_timeline HOT 1
- twitculrl::oAuthHandlePIN() No longer works HOT 3
- Favorites URLs are incorrect now
- No Makefile inside HOT 1
- userLookup does sometimes HOT 1
- account/rate_limit_status does not exist anymore
- access to perform modifications into project HOT 5
- trends APIs don't work
- Provide a tutorial on how to set this up for VS2015 HOT 5
- Steaming API
- gets is undefined HOT 2
- Seach for Hashtag does not work on linux HOT 3
- Cannot access the tweet_mode option HOT 1
- Is this project still being maintained? HOT 2
- twitcurl and openssl HOT 1
- #include <twitcurl>?
- 🚨 Potential Classic Buffer Overflow (CWE-120)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitcurl.