Migration path for Fql.multiquery - facebook-graph-api

I'm new to Facebook development. I'm working on migrating an existing app in accordance to the Graph API upgrade guide. I'm looking for guidance around calls such as api.facebook.com/method/Fql.multiquery.
My question is: does this type of API need to be upgraded as well, or does it only apply to graph.facebook.com calls? I want to ensure that api.facebook.com/method/Fql.multiquery calls will still work after 4/30/15.

You may want to take a look at the Batch Requests of the Graph API. You can also specify dependencies between the requests.

Calls to http://api.facebook.com/method/Fql.multiquery will no longer work. The REST API is long deprecated anyway.
As #luschn said, you have to migrate to the Graph APIs batch requests, and use the /fql endpoint. You can only use FQL if you have a v2.0 app, and not higher.

Related

Build a Third Party API Using Django

I am interested in building a third party software to provide service through API. But the problem is I don't have any in depth knowledge related to this (i.e how am I suppose to count the api calls, where I will store the data from both side like this) Can someone suggest me some resources that will help me to go through this. Thank you!
I would suggest, that you write your own middleware. A stated on https://docs.djangoproject.com/en/3.2/topics/http/middleware/
Middleware is a framework of hooks into Django’s request/response processing. It’s a light, low-level “plugin” system for globally altering Django’s input or output.
For each request made to your API you can keep track of it in the database. Just create a model for it and add a new entry on every request via the middleware

Provide API for a Django project as a different docker service

I recently started to work on a friend's project in Django and we want to provide a REST API so other projects can consume our data. I'm starting to learn django-rest-framework (and django-rest-swagger for documentation). Is it possible to create the API as a separate service? this way we dockerize it and serve the api in one container, and keep the application on its original container preventing that if many requests to the API were made, it will not interfere on the application (by bringing it down for example). If it is not possible what is the best way for implement the API on the project?
Yes, this is possible. See here. Structurally, you will probably want to write the project by keeping all presentation-related apps separate from the API-related apps.

Does graphene-django dynamically create an API documentation?

I'm considering using GraphQL with a Django backend service but I couldn't find much information regarding the API documentation. I need some solution to dynamically generate the documentation, perhaps like npm's graphql-docs with a result similar to GitHub's API docs.
Is it feasible to accomplish with graphene-django? If not, what's a good alternative for a python environment?
Yes, it's very easy to do by using GraphiQL, which is embedded in to Graphene.
The instructions on how to integrate this with Graphene are here in the graphene-python documentation. --- basically you need to add the parameter graphiql=True when setting up the API route in your urls.py file.
After it is set up, if go to your API endpoint in your browser, you'll see a nice interface for sending API calls, getting API responses, and reading documentation for both queries and mutations. The documentation is initially hidden on the right until you click on the "< Docs" link.

Calling Microsoft Graph from Google Appengine Python

I need to call the Microsoft Graph from a Google Appengine Python application, this requires oAuth2 authentication.
Google provide the Google API Client Libraries for calling their own REST api's (such as Calendar / Drive / Youtube etc) - is it possible to use the library to call other non Google REST API's such as Microsoft Graph?
If not has anyone used another library to do so from Appengine Python. You can not use the Microsoft supplied python SDK as this requires python version 3+ and Appengine only supports 2.7.
Thanks in advance,
Ian
The authorization token you receive from Google will only work with their APIs. You'll need a separate token for use with Graph. For this you can use ADAL library.
Since you need to stick with 2.7, you'll need issue REST directly. The existing SDK (as you noted) requires py3. You may want to take a look at restclient for this. Its been a while since I've had to use this lib but I recall it really simplified calling REST endpoints.

How to programatically create a Facebook application via JS SDK or Open Graph API? (createApplication)

I know there are currently two methods that can be used to do this, documented (poorly) on Facebook's Developer site:
The old (depreciated) JavaScript SDK FB.Connect.createApplication
A new FBJS method Facebook.createApplication (only for use on Canvas pages)
The problem is that I not using a Canvas app that runs FBJS, and I am not using the OLD JS SKD. I am trying to do this on a regular old PHP website that uses the current JavaScript SDK and the PHP SDK.
I am doing the usual Open Graph API calls and such with the current SDK, so I understand the basics, I'm just not sure how to proceed to use the OLD SDK, or if (fingers crossed) I even really have to?
So, is there a way to make new Facebook Apps with the current JS SDK? Or with a server side PHP SDK call to the Graph?
And if not, how do I call the old SDK to do this?
Thanks
UPDATE: You still can't do this, but there is an official bug in the Facebook tracker about it: http://developers.facebook.com/bugs/295627350461318
There isn't outside of the OLD SDK as you indicated. It's been removed (what Facebook calls "deprecated"). I put in a feature request recently for them to add it back into the API:
Me:
The Facebook Developer tool is
considerably lacking in features. We'd
like to be able to create a third
party application that adds layers of
functionality to the developer
application, but we'd need to be able
to create and administer applications
via the Graph API.
The Graph API supports querying for
information on existing applications.
To create, administer or delete
applications developers must go to the
Developer Application.
Them:
------- Comment #1 From Jeff Bowen 2010-12-07 16:59:12 (-) [reply]
------- Thanks for the request. We’ll track this on our wishlist