0 move that you would need certainly to generate an application you to needs a haphazard affiliate to help you authorize it to get into membership research.
Along with the Chart API, FQL brings a fine substitute for querying Facebook’s Personal Graph and provides an effective SQL-motivated syntax that all builders find user-friendly
The foundation of your inquire is an effective node which have an ID (identifier) from “644382747,” equal to a guy titled “Matthew A beneficial. Russell,” who’s preloaded because already logged-inside the associate to the Graph Explorer. Brand new “id” and “name” viewpoints towards the node are called sphere . The foundation of your own ask you certainly will exactly as without difficulty have been various other node, and also as we shall in the near future come across, it’s very pure in order to “walk” or navigate this new chart and you may inquire almost every other nodes (that may be some body or anything given that courses otherwise Television shows).
You could modify the new inquire with a beneficial “friends” relationship, because shown inside the Profile 2-2, because of the simply clicking brand new + and then scrolling so you’re able to “friends” regarding “connections” pop-upwards menu. The newest “friends” contacts that appear about unit represent nodes which might be linked into the new query node. Thus far, you could click on all blue ID areas for the this type of nodes and commence a query thereupon style of node because the the cornerstone. Within the circle science words, we what is actually titled an ego chart , whilst provides a star (otherwise pride ) as the focus otherwise logical heart, that is associated with other nodes to it. A pride graph perform resemble a hub and you will spokes for people who would be to mark it.
One which just recover likes connections for the members of the family, yet not, you ought to approve the Chart API Explorer application so you can clearly availability your own friends’ wants of the updating the latest accessibility token which spends and then agree so it accessibility, since proceed the link found within the Shape dos-cuatro
A much deeper amendment on the totally new query would be to incorporate “likes” connections for every of nearest and dearest, because shown in the Figure 2-3. Brand new Chart API Explorer enables you to without difficulty authorize it by the clicking on new Score Availableness Token button and you will checking the latest “friends_likes” box into the Family unit members Study Permissions case. Into the circle research conditions, we still have a pride chart, but it’s potentially a great deal more cutting-edge so far because of the many a lot more nodes and you can contacts that may exist among them.
The latest Debug button they can be handy for troubleshooting concerns you believe is going to be going back study however, aren’t doing so based on the brand new authorizations with the access token.
The results away from a graph API inquire are came back from inside the a good much easier JSON format which may be with ease manipulated and you may canned.
It seems becoming the scenario that one analysis you could potentially ask to your Graph API, you might ask through FQL, and even though it may be true that certain state-of-the-art issues you to are you can easily having FQL might not be you are able to into the Chart API, it seems that Facebook’s lengthened-name package will be to ensure that the Graph API is at full parity which have FQL. For example, specific present investment in the Graph API led to several off powerful additional features, for example profession expansion and you may nesting. When you’re interested in a little more about FQL, request the newest FQL Reference, and check out aside a query into the FQL Query console that’s offered because the a different sort of choice regarding the Chart API Explorer. Eg, you could potentially ask the initial and you may last labels of your family unit members on the FQL Inquire case of one’s Graph API Explorer with another FQL inquire:
Even in the event we’re going to programmatically mention brand new Chart API with an excellent Python package afterwards contained in this chapter, you might opt to build Chart API issues more personally over HTTP yourself by the mimicking brand new demand you get in brand new Chart API Explorer. Such as, Example dos-step 1 uses the brand new needs plan so you can describe the procedure of to make an HTTP demand (instead of playing with a far more difficult package out of Python’s fundamental collection, eg urllib2 ) to have fetching your friends in addition to their likes. You can created this one inside the a critical toward foreseeable pip create demands command. The latest inquire are passionate of the opinions in the sphere factor that is exactly like what might feel gathered interactively throughout the Graph API Explorer. Regarding style of desire is the fact that the members of the family.limit(10).fields(likes.limit(10)) sentence structure spends a comparatively the fresh ability of the Graph API entitled profession extension designed and come up with and you can parameterize multiple requests in a single API name.
