Look for Appendix B to possess information on applying a keen OAuth 2

Look for Appendix B to possess information on applying a keen OAuth 2

0 flow that you would must create a credit card applicatoin you to demands a random member to help you authorize it to gain access to account studies.

In addition to the Chart API, FQL will bring a superb substitute for querying Facebook’s Public Graph and you can keeps a SQL-motivated sentence structure that most developers look for intuitive

The cornerstone of ask is a great node with an enthusiastic ID (identifier) away from “644382747,” corresponding to a man titled “Matthew A good. Russell,” who’s preloaded because already signed-in associate to the Chart Explorer. New “id” and you will “name” thinking towards the node have been called industries . The cornerstone of the ask could just as effortlessly was another node, so when we are going to in the near future pick, it is extremely pure so you can “walk” otherwise navigate the latest chart and inquire other nodes (which are somebody otherwise some thing once the courses or Television shows).

You could potentially modify the unique ask that have a beneficial “friends” relationship, as the shown from inside the Contour dos-2, of the simply clicking the new + immediately after which scrolling so you can “friends” throughout the “connections” pop-right up eating plan. New “friends” contacts that appear in the system represent nodes which might be linked with the unique inquire node. Yet, you can click on any of the blue ID sphere when you look at the such nodes and initiate a query with that version of node because the the foundation. For the network technology terminology, we’ve got what is actually titled an ego chart , whilst keeps an actor (or pride ) as the focus otherwise logical cardiovascular system, that is connected to other nodes up to they. A pride chart do resemble a hub and you may spokes for many who were to draw they.

Before you could retrieve wants connectivity for your relatives, although not, you ought to authorize the new Graph API Explorer software to explicitly accessibility your friends’ enjoys from the updating this new supply token that it spends right after which accept this availableness, since shown inside the Profile dos-4

A much deeper modification into the new inquire should be to add “likes” contacts per of your family members, while the shown inside Contour dos-step 3. The Chart API Explorer makes you with ease approve they by the simply clicking new Score Availableness Token option and checking new “friends_likes” box towards the Nearest and dearest Investigation Permissions tab. From inside the system science terms, i still have a pride graph, however it is possibly way more cutting-edge yet on account of the countless a lot more nodes and associations which could exist among them.

The fresh Debug option can be handy to possess troubleshooting requests which you imagine will be returning study but are not doing so considering the authorizations for the accessibility token.

The outcomes regarding a graph API ask is came back in a much easier JSON style which is often effortlessly manipulated and you can canned.

It seems become the outcome one people data you could potentially ask into Chart API, you might ask through FQL, and although it could be correct that specific complex inquiries you to definitely is actually you are able to which have FQL is almost certainly not you can easily toward Graph API, it appears that Facebook’s extended-name plan is to try to make sure the Graph API was at complete parity having FQL. Such, particular latest financial investments throughout the Graph API triggered a variety away from powerful new features, such as for example field expansion and you may nesting. If you are interested in learning about FQL, consult the newest FQL Resource, and attempt aside a query into FQL Query system which is offered just like the yet another option from the Graph API Explorer. Including, you can inquire the initial and you may history labels of your own relatives regarding the FQL Query tab of one’s Graph API Explorer that have next FQL ask:

Though we are going to programmatically discuss new Graph API which have good Python package after contained in this section, you can opt to make Graph API questions a whole lot more privately over HTTP on your own from the mimicking the brand new consult you get in the fresh new Graph API Explorer. Such, Example 2-step 1 uses new needs package in order to express the entire process of and make an HTTP consult (rather than using a far more troublesome package out-of Python’s fundamental collection, particularly urllib2 ) having fetching your buddies and their enjoys. You could potentially created this package when you look at the a terminal on foreseeable pip created needs command. The latest query are polyamorous dating sites passionate of the thinking on fields parameter and that is just like what can become accumulated interactively in the Graph API Explorer. Of sort of desire is that the family relations.limit(10).fields(loves.limit(10)) syntax uses a fairly new feature of your Graph API titled profession extension designed to make and you will parameterize several questions in one single API phone call.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *