‰PNG  IHDRèèÂÁC³×IDATxÚíÖ1 À°ù7 89šTÁ®5<'wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ; wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ»`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î€`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î€`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸KÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãHÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãHÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜÀ¸Æ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`ÜãÆ0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãw0î€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŒ;wÀ¸€qŒ;`ÜÀ¸Æ0î`Üãw0î€qãwÀ¸€qŒ;`ÜÀ¸ÆŒ;`ÜãÆ0î€qãwÀ¸€qŒ;wÀ¸ÆŒ;`ÜãÆ0î`Üãw0î€qŽºÆá¾d“é­IEND®B`‚ FM / docs
/home/wespack/public_html/fb3/fbsdk/docs
NameSizeModeActions
AccessToken.fbmd38850644editdlrm
example_access_token_from_canvas.fbmd14180644editdlrm
example_access_token_from_javascript.fbmd26160644editdlrm
example_access_token_from_page_tab.fbmd13570644editdlrm
example_batch_request.fbmd53570644editdlrm
example_batch_upload.fbmd21670644editdlrm
example_facebook_login.fbmd32570644editdlrm
example_pagination_basic.fbmd15820644editdlrm
example_post_links.fbmd16630644editdlrm
example_retrieve_user_profile.fbmd13920644editdlrm
example_upload_photo.fbmd17570644editdlrm
example_upload_video.fbmd12750644editdlrm
Facebook.fbmd177370644editdlrm
FacebookApp.fbmd20690644editdlrm
FacebookBatchRequest.fbmd32080644editdlrm
FacebookBatchResponse.fbmd22890644editdlrm
FacebookCanvasHelper.fbmd32580644editdlrm
FacebookClient.fbmd41560644editdlrm
FacebookFile.fbmd17690644editdlrm
FacebookJavaScriptHelper.fbmd31670644editdlrm
FacebookPageTabHelper.fbmd18620644editdlrm
FacebookRedirectLoginHelper.fbmd71040644editdlrm
FacebookRequest.fbmd57280644editdlrm
FacebookResponse.fbmd51880644editdlrm
FacebookResponseException.fbmd25920644editdlrm
FacebookSDKException.fbmd7630644editdlrm
FacebookVideo.fbmd13460644editdlrm
GraphEdge.fbmd35210644editdlrm
GraphNode.fbmd188590644editdlrm
htaccess1980644editdlrm
PersistentDataInterface.fbmd22200644editdlrm
PseudoRandomStringGeneratorInterface.fbmd26690644editdlrm
sdk_downloads.fbmd47620644editdlrm
sdk_getting_started.fbmd139540644editdlrm
sdk_landing_page.fbmd24360644editdlrm
sdk_reference.fbmd74710644editdlrm
SignedRequest.fbmd32900644editdlrm
UrlDetectionInterface.fbmd16320644editdlrm
Edit: /home/wespack/public_html/fb3/fbsdk/docs/GraphEdge.fbmd (3521B)
# GraphEdge for the Facebook SDK for PHP When a list of nodes is returned from a Graph request, it can be cast as a `GraphEdge` which provides convenient ways of interacting with the data which includes pagination. ## Facebook\GraphNodes\GraphEdge {#overview} You can grab a `GraphEdge` from a response from Graph. ~~~~ $graphEdge = $request->getGraphEdge(); ~~~~ Usage: ~~~~ // Iterate over all the GraphNode's returned from the edge foreach ($graphEdge as $graphNode) { // . . . } ~~~~ ## Pagination {#pagination} With the help of the `Facebook\Facebook` super service class, the `GraphEdge` collection can grab the next and previous sets of data. ~~~~ $albumsEdge = $response->getGraphEdge(); // Get the next page of results $nextPageOfAlbums = $fb->next($albumsEdge); // Or the previous page of results $previousPageOfAlbums = $fb->previous($previousOfAlbums); ~~~~ When the next or previous page returns no results, `$fb->next()` will return `null`. ## Deep Pagination {#deep-pagination} Sometimes Graph will return a list of nodes within a node. Paginating on these sub lists can be non-trivial. Fortunately, the `GraphEdge` collection takes the guesswork out and allows you to paginate deeply within a `GraphEdge`. The following example paginates over the first 5 pages of a list of Facebook pages. For each page it paginates over all the likes for that page. ~~~~ $pagesEdge = $response->getGraphEdge(); // Only grab 5 pages $maxPages = 5; $pageCount = 0; do { echo '

Page #' . $pageCount . ':

' . "\n\n"; foreach ($pagesEdge as $page) { var_dump($page->asArray()); $likes = $page['likes']; do { echo '

Likes:

' . "\n\n"; var_dump($likes->asArray()); } while ($likes = $fb->next($likes)); } $pageCount++; } while ($pageCount < $maxPages && $pagesEdge = $fb->next($pagesEdge)); ~~~~
## Method Reference {#method-reference} ### getMetaData() {#get-meta-data} ~~~~ public array getMetaData() ~~~~ Sometimes Graph will return additional data associated with an edge. You can access this raw data as an array with `getMetaData()`. ~~~~ $metaData = $graphEdge->getMetaData(); ~~~~ ### getNextCursor() {#get-next-cursor} ~~~~ public string|null getNextCursor() ~~~~ Returns the `$.paging.cursors.after` value if it exists or `null` if it does not exist. Since cursors are sort of like bookmarks for paginating over an edge, it is sometimes handy to store the last cursor used so that you can revisit the exact position at a later time. ~~~~ $nextCursor = $graphEdge->getNextCursor(); // Returns: MMAyDDM5NjA0OTEyMDc0OTM= ~~~~ ### getPreviousCursor() {#get-previous-cursor} ~~~~ public string|null getPreviousCursor() ~~~~ Returns the `$.paging.cursors.before` value if it exists or `null` if it does not exist. ~~~~ $previousCursor = $graphEdge->getPreviousCursor(); // Returns: ODOxMTUzMjQzNTg5zzU5 ~~~~ ### getTotalCount() {#get-total-count} ~~~~ public int|null getTotalCount() ~~~~ Some endpoints and edges of Graph support a summary of data. If the `summary=true` modifier was sent with a request on a supported endpoint or edge, Graph will return the total count of results in the meta data under `$.summary.total_count`. `getTotalCount()` will return that value or `null` if it does not exist. ~~~~ $response = $fb->get('/{post-id}/likes?summary=true'); $likesEdge = $response->getGraphEdge(); $totalCount = $likesEdge->getTotalCount(); // Returns: 10 ~~~~