views:

300

answers:

1

So i am upgrading our service to go to the new OAuth security measures. Using a single twitter account to send Direct Messages to users for an alert. I wrote up a quick app that retrieved the access token and secret using the Java library. But the kicker is that i need to send these messages via C++. and a Javascript file. (this is currently working using the old way of sending the message via user:password: URL encode.)

My question though is how do you send the direct message using the access token with C++ & Javascript. If you have any links/docs or general knowledge I would appreciate it. I am not looking for the answer on how to do everything. Just resources to put me on track on how to do this.

It almost appeared that i would need to send Access Token to Twitter, then the Message request. But can't find good enough documentation on this. and the Twitter Dev talk has not replied to me either.

Thank you guys in advance!

A: 

What does "via C++ and a Javascript file" mean exactly? What purpose does the Javascript file serve if you are making the request in C++ ? Or do you mean that you need to do it both from C++ and also from Javascript? What operating system? I would ask in a comment, however I apparently need more rep in order to comment on posts.

One option is to use liboauth which is available on sourceforge.

You can also check out my blog post on the subject. It is Win32 specific, however it may also be of general benefit as the code is straightforward and demonstrates the flow required to go through the OAuth process.

Brook Miles
I have it working, The reason it is built out this way is because i can build Http requests to several Webservers, Twitter just happened to be one and was building it out. the JS builds the request, the code then compiles it and sends it off to our httpsender. It creates a way to have custom scripts for other webservers we want to support then in turn changes can be done via script instead of changing the C++ code ;)
Darxval