What would be the best way to connect to Facebook via C/C++? [duplicate] - c++

This question already has an answer here:
Most complete c++ facebook library [closed]
(1 answer)
Closed 9 years ago.
I'm looking to create a desktop app in C/C++, most likely with Qt, that has the ability to connect (read/post) to Facebook. Which got me thinking, how exactly would you go about doing such a task? I know many desktop apps written in C++, such as Spotify, have the ability to do it. Are there any good libraries available? What's the common way to do it? Will I have to parse Javascript or PHP in C++? I know there's a C# API, which I've used, and it worked fine. Anything similar for C++? Thanks!

If you can get a C++ json interpreter you can use the Graph API. https://developers.facebook.com/docs/getting-started/graphapi/. You make queries over HTTPs and get a response in JSON that you can use however you want.

Related

How can I call Dart from C++?

I've found several posts about this and it sounds like the answer is that it's possible by embedding the Dart VM (based on this 2013 post and this 2019 post).
Is this still the best way?
If so, is there official guidance from Dart on how to do this, or are you on your own? I know there's this demo of embedding Dart in Windows but it's from 9 years ago and I'm wondering if there's anything more recent to reference.
Note that this is different from Dart code calling C using dart:ffi which then has a callback into Dart, which I see is supported. I'm looking for a way for a C++ program to call Dart code.

What issues coldfusion UI tags have [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have heard many times senior developers asking not to use coldfusion UI tags and that they cause problems. But can someone let me know what kind of problems it creates? I do not use CFML UI tags mostly, but some of the legacy code has them already. So if I have to change them, I need to convince people why they need to be changed. Reasons...
Edit:
I know this has been put on hold, but what I was asking about few points, a list kind of. So when I am talking with someone a client, fellow developer and want to emphasize the reason for not using cfform, I do have those reasons. With lot of good and some not so good answers, I reckon I can put up a list
1) They use old outdated versions of JavaScript libraries and HTML.
2) They have caused security issues in the past.
3) They get in the way of knowing how things actually work.
4) ColdFusion UI does work currently. However, the issue people have is simply, technology changes. It's simple as that really. jQuery and other UIs are constantly changing. Along with a lot of other APIs that ColdFusion UI uses. This means, if you are using ColdFusion 10 today and 5 years from now you are on ColdFusion 13 you may have issues with your ColdFusion 10's UI.
5) Another example is . had an issue recently because it uses google maps and google updated their API. Since the update took place it broke the tag. Since this is a ColdFusion UI and not your own it is difficult to just update the API calls. Which is why it is recommended to use your own. It's a simple fix with jQuery UI but not really ColdFusion UI.
6) Also, a lot of ColdFusion UI messes with your headers. For example, . This tag has been known to break mobile sites and other headers because it adds its own headers to your HTML page.
7) cfinput required="" is conflict with the HTML 5 input required=""
The issues with the UI tags built-in to CF are:
Were written by people who are not CFML developers.
Were written by people who are not HTML/JS developers.
They use old outdated versions of JavaScript libraries and HTML.
They have caused security issues in the past.
They get in the way of knowing how things actually work.
They don't have documentation comparable to the average JS library.
The Flash and XML versions of cfform were especially difficult to work with.
And possibly a few other reasons that have slipped my mind.
If you have old code that uses them, and the code works acceptably, then you're unlikely to get shot for not changing it - assuming there are no further undiscovered security issues, obviously.
(Though of course, whether the code does actually work acceptably or has simply been put up with may be a matter of debate.)
If you're working on new code, you should learn to use modern UI libraries that are written by actual JS developers who understand browsers, libraries that are far more widely tested and documented, that you can understand how they work, that put you in control of what's being done, and so on.
Instead of giving you a link to the solution to a problem that is unknown to #CFML_Developer I will simply briefly explain the issues I've had and other have had with ColdFusion UI.
ColdFusion UI does work currently. However, the issue people have is simply, technology changes. It's simple as that really. jQuery and other UIs are constantly changing. Along with a lot of other APIs that ColdFusion UI uses. This means, if you are using ColdFusion 10 today and 5 years from now you are on ColdFusion 13 you may have issues with your ColdFusion 10's UI.
Another example is <cfmap>. <cfmap> had an issue recently because it uses google maps and google updated their API. Since the update took place it broke the <cfmap>tag. Since this is a ColdFusion UI and not your own it is difficult to just update the API calls. Which is why it is recommended to use your own. It's a simple fix with jQuery UI but not really ColdFusion UI.
Also, a lot of ColdFusion UI messes with your headers. For example, <cfform>. This tag has been known to break mobile sites and other headers because it adds its own headers to your HTML page.
Finally, I personally find all ColdFusion UI more difficult to work with than actual jQuery UI. Just because with jQuery UI you can be specific to your needs and it's a lot more flexible to work with. Honestly, it's also faster to do if you understand jQuery.

How to create a Playstation Portable (PSP) Homebrew App [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm having some trouble starting out with PSP Homebrew. I purchased a PSP 1001 model and successfully hacked it, but I'm having some trouble getting some information about how to start out creating a custom homebrew app.
I want to create an app that mimics the 'TV-B-Gone' - essentially, it just goes through each of the codes for turning TV's off, or on, and throws the code out through the IR reciever on the 1000 model.
I've found information that you can use Javascript, but don't get any REAL native functions, Actionscript, Lua, and C/C++. I know C and C++, and both apparently offer the ability to access all aspects of the hardware.
I was wondering if anyone would have any advice on how to create a homebrew app. I've created some C++/C applications, but am I able to just put those onto my PSP, or is there a sdk or protocol I have to go through?
I've done some looking around, and all of the sites that people recommend are a couple of years old, and most are now owned by different people and don't offer the tutorials anymore.
Also, would anyone know how to code the transmission out through the IR transceiver on PSP?
Thanks a ton guys, I know this is an old topic that not many people are looking into currently, so any help is appreciated.
TL:DR - Does anyone know any good tutorials for starting PSP homebrew app creation in C++ or C, and does anyone know how to send a code out of the IR module on PSP 1000's in C++ or C?

How to programatically write a PST file [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How can I create an Outlook PST file using .Net?
How can I write an Outlook PST file with headers? Preferably in .NET, though C++ or anything else would be useful too
I have looked at the PST SDK by Microsoft, but it appears to be read only.
The only code I have found is the CodeProject article "Writing Email to the File of the PST Format", but this code can't write e-mail headers - just body and subject.
Your best bet is to use Microsoft's Messaging API (MAPI). There's plenty of help available online, and there's a sample app called MFC Mapi that one of the Microsoft guys wrote to demonstrate how the API works.
Would the .pst file format documentation be of use to you? From the brief look I took, it seems to document the format itself, so you can implement reading/writing functionality. I don't know how detailed it is, since I haven't used it myself.
http://msdn.microsoft.com/en-us/library/ff385210%28v=office.12%29.aspx

How can z/OS call a web service? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a COBOL program that needs to get data from a web service. Without using CICS what are my best options? I thought that a C program could read the web service and save it to a file, then the COBOL could read that file. Can COBOL call a web service? The data is about 300mb in size.
Use the IBM TCP/IP 'EZASOKET' modules
I work for a company with a z/OS system running mostly COBOL, batch (JCL) and CICS. To call webservices, we wrote a module to implement HTTP 1.0 using TCP/IP. With modules
EZASOKET
GETHOSTBYNAME
SOCKET
CONNECT
WRITE
FCNTL
READ
CLOSE
SELECTEX
supplementary modules:
EZACIC04 translates EBCDIC to ASCII
EZACIC05 translates ASCII to EBCDIC
EZACIC06 convert character to bit mask
EZACIC08 decode IP address
Since I wrote this for my company, I can't just give out the code. But for reference, it took me 3 days to write the module, and that was with an example to start with that did a partial hacky way of doing it.
You'll need to read through IBM's references to know how to use the EZA modules.
http://publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.halc001/sampcs.htm
It is possible to call java from COBOL programs on z/os.
We have done it in our company.
You have to specify that it is RECURSIVE
You have to import the classes
Class HelloJ is
"com.ibm.zos.batch.container.test.HelloJ"
Class JavaException is "java.lang.Exception"
Class BCDTranHelper is
"com.ibm.batch.spi.UserControlledTransactionHelper".
The you have to include JNI.
LINKAGE SECTION.
COPY JNI
***Then you can invoke java from COBOL in your PROCEDURE DIVISION with:
Invoke HelloJ "sayHello"
Also look at Java Exception Check * to see how to handle the exceptions.
This is very useful if you want to invoke a web service from your COBOL program on z/os.
see this link for more details.
http://pic.dhe.ibm.com/infocenter/zos/v1r13/index.jsp?topic=%2Fcom.ibm.zos.r13.iean500%2Fcodeexm.htm
Maybe have a look at this article. It suggests creating a C/C++ wrapper interace to the web service. Although this article is for iSeries, you might be able to implement something very similar under zSeries using BPXBATCH
Basically, they suggest using a C wrapper between your COBOL code and the C++ code that interfaces with the web service. This solution allows COBOL to call a C function in a relatively straight forward way. The C function mimics C++ behavior by implementing the call to the Web service using a C++ proxy.
If you can use Java at your site calling Java from a cobol program to access the web service may be an option. Assuming your using Enterprise cobol check out section 6.44 of Java Stand-alone Applications on z/OS Volume II
Use the z/OS client web enablement toolkit if you are at z/OS 2.1 or above.
Look at the sample in SYS1.SAMPLIB(HWTHXCB1) for Cobol.
If your Cobol is running under DB2 DSN command, you can also use SOAPHTTP* scalar functions.