Is there an option to translate the content using FB Graph API - facebook-graph-api

I am using FB Graph API to get the posts and comments from a Page. Just wanted to know if there is an option to convert the comments /content of any post to required language.

No, Facebook does not offer an API for that.
I am not sure if they are still using Bing for their live translation of content, or have implemented their own system by now. (I think I remember that in the past it used to say below such translations that they were handled through Bing – but that note seems to have gone.)
But using a service such as Bing or Google is probably your best option. (Not sure if they offers APIs for that for free though.)

Related

Free google translation

I found online that I can use this URL to take a free translation from Google Translate
https://translate.googleapis.com/translate_a/single?client=gtx&sl={0}&tl={1}&dt=t&q={2}
Where {0} is the origin language, {1} is the target language and {2} is the text I want to be translated and I'm using this inside my C++ project.
With System::Net::WebClient DownloadString() method I download the file that that URL provides me.
I'd like to know if there's some kind of limitation in using this.
Can I use this URL in my code to take a translation from Google? Is there something wrong about this?
Thanks
It's an unsupported API endpoint used by the Google Translate extension for Chrome. It may disappear, stop working, or block your requests at any time and without notice.
The only supported API Google offers for their machine translation services is the Google Translate API.
As #一二三 say it`s not official supported public API same as get_video_id from YouTube.
So You have few ways for solving this problem:
Use this or other crutches like this one. And always check if it`s works today or not.
Using official PAID gTranslateAPI
Use some free API like: Yandex API Bing Translator

good use case of HATEOAS

may I have some example/typical use case of HATEOAS? I agree it can be a very powerful concept provide great flexibility but I am not sure how to properly get benefit from HATEOAS. would be great if you can share your experience/use case.
A good answer from #dreamer above, but HATEOAS is not present in most REST-based services. It is a constraint on the REST architecture style that allows clients to interact with a service entirely via the hypermedia contained in the resources.
If you look at the Twitter or Facebook REST APIs, you won't find hypermedia. Look at the Facebook friendlist resource. There are no hypertext links in that resource that you can use to transition the state of the resource - to delete, update, etc. Instead, you need to read the out-of-band documentation to understand what you need to do to delete that resource.
One of the claimed advantages of using hypermedia in your APIs is that you can manage change within the resources themselves. For example, what if Facebook wanted to add additional functionality to the frendlist? If it were built with HATEOAS in mind, the resource would be updated to add the hyperlinks provides those additional state transitions.
If this sounds difficult, you're right. But as a developer of client applications, however, once you understand how the hypermedia is presented, you can build applications that will evolve along with the API itself.
So how do you build APIs using HATEOAS? A number of options are out there, but I like the Hypertext Application Language (HAL) the best.
UPDATE: Since you asked for an example, here's a link to a demo using HAL.
Good public HATEOAS use cases are hard to find, because there are a lot of misconceptions around REST, and HATEOAS can be hard to implement. You really need to have a good understanding of its benefits, before you're willing to put yourself through the trouble of getting it to work, and if the clients don't follow it correctly, all work will be in vain.
From my experience, implementing proper REST in a company is a culture change as important as moving to version control systems or agile development. Unless everyone adopts it and understands it, it causes more trouble than it solves.
Having that in mind, I think the best example one will find is the foxycart.com HAL API, on the link below:
https://api-sandbox.foxycart.com/hal-browser/hal_browser.html#/
It's very powerful concept used in RESTful presentation of the application to the client. There are many many projects which are adopting this interface now. A typical use case for this is Web Services APIs using RESTful APIs. A RESTful APIs typically consists of the following elements:
base URI, such as http://example.com/resources/
an Internet media type for the data. This is often JSON but can be any other valid Internet media type (e.g. XML, Atom, microformats, images, etc.)
standard HTTP methods (e.g., GET, PUT, POST, or DELETE)
hypertext links to reference state
hypertext links to reference related resources
The application state can be modified using above HTTP methods for example, to get a particular resource, A client can issue a REST query using curl like:
curl -X GET --url "http://example.com/resource/" -X "Content-Type:application/json"
you could go through the man pages for curl and its usage. More on RESTful interface concepts can be looked upon at wiki

Automatically Logging Into A Website From C++

I'm trying to make an autorun app with c++ that doesn't have an UI, but it will log into google drive when u plug in the USB drive. I was wondering if there was a way to do this, either by using google api, or by detecting the field forms on the login screen, and automatically filling them in. Also this is going to be strictly a private software.
Add one part How do you make a HTTP request with C++? with two parts https://developers.google.com/drive/v2/reference/.
Shake lightly. Chill and serve.
Optionally add for flavor: https://developers.google.com/drive/auth/web-server
However, I'm unable to find a c++ oath2 library. The closest thing I found was https://code.google.com/p/twitcurl/. If you find an oath library, please comment on this.
UPDATE:
POCO has a OAuth 1.0 implementation seen here: https://github.com/pocoproject/poco/tree/develop/Net/samples/TwitterClient/src
Also, according to this landmark blog post, there are still many concerns about OAuth 2.0's security. The 1.0 implementation above is what I would attempt.
For more information on OAuth 2.0, see RFC6749 and RFC6750.

Retrieving ARB subscriptions with Authorize.Net API

Is it possible using the APIs provided by Authorize.Net to retrieve or search for a list of automated recurring billing (ARB) subscriptions? The high-level APIs only appear to allow for creating, updating, or cancelling existing ARB subscriptions. A quick look at the advanced integration method (AIM) APIs do not indicate (clearly) if this is possible.
I have already written an implementation centered around HttpWebRequest/Response, ASP.NET POST hijacking, SGML parsing, and XML DOM traversal, but I would prefer a proper solution that doesn't rely on data scraping (what I am currently doing). That, and the current implementation is a bit slow.
If it's not already apparent, I am utilizing C# and the Authorize.Net ARB/CIM API, although I am really looking for a (better) solution that utilizes any available API.
References:
http://developer.authorize.net/api/
No. They do not currently offer this through an API or through their control panel.

Building wiki on top of a restful application

Does anybody know a wiki engine that can be built on top of a RESTful application?
I have a restful application, that exposes a document resource,
I want the wiki engine to use the REST API to persist the documents, instead of saving them to a DB.
I am also open for suggestions of an open-source wiki engines that can be easily modified to support such functionality.
As Wikis were originally designed to work in a standard browser, and most browsers did not support anything except GET and POST, REST is not a concept used a lot on the wiki world. However, nowadays, some wikis (foswiki - the community fork of TWiki for instance) provide you a REST API to it http://foswiki.org/System/CommandAndCGIScripts#rest ).
But you need the opposite: a wiki with a customizable backend (storage) that could be plugged on top of a REST storage service. As wikis with a pluggable backend, I know only of pmwiki http://www.pmwiki.org/wiki/PmWiki/PmWiki and foswiki (the open fork of TWiki) http://foswiki.org.
Okay, this is a puzzler. Wikis in general are more or less the canonical example of a RESTful approach. The page name names a resource. What do you want that isn't in, eg, Twiki?
While you could try to find a wiki that can use a REST backend, it may be better to write a small wiki yourself. Because even though a your backend has REST interface, that doesn't mean you can put some other application in front of it.
dokuwiki does not use a database. It is a filesystem based wiki. I don't know its internal code structure but you might be able to use it as your base.