Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<card>
# FacebookResponse for the Facebook SDK for PHP

Represents a response from the Graph API.
</card>

<card>
## Facebook\FacebookResponse {#overview}

Usage:

~~~~
// A FacebookResponse is returned from an executed FacebookRequest
try {
  $response = (new FacebookRequest($session, 'GET', '/me'))->execute();
  // You can get the request back:
  $request = $response->getRequest();
  // You can get the response as a GraphObject:
  $object = $response->getGraphObject();
  // You can get the response as a subclass of GraphObject:
  $me = $response->getGraphObject(GraphUser::className());
  // If this response has multiple pages, you can get a request for the next or previous pages:
  $nextPageRequest = $response->getRequestForNextPage();
  $previousPageRequest = $response->getRequestForPreviousPage();
} catch (FacebookRequestException $ex) {
  echo $ex->getMessage();
} catch (\Exception $ex) {
  echo $ex->getMessage();
}

// You can also chain the methods together: 
$me = (new FacebookRequest(
  $session, 'GET', '/me'
))->execute()->getGraphObject(GraphUser::className);
echo $me->getName();
~~~~
</card>

<card>
## Instance Methods {#instance-methods}

### getGraphObject {#getgraphobject}
`getGraphObject(string $type = 'Facebook\GraphObject')`  
Returns the result as a `GraphObject`.  If specified, a strongly-typed subclass of `GraphObject` is returned.
### getGraphObjectList {#getgraphobjectlist}
`getGraphObjectList(string $type = 'Facebook\GraphObject')`  
Returns an array of `GraphObject` returned by this request.  If specified, a strongly-typed subclass of `GraphObject` is returned.
### getRequest {#getrequest}
`getRequest()`  
Returns the `FacebookRequest` that produced this response.
### getRequestForNextPage {#getnextpage}
`getRequestForNextPage()`  
If the response has paginated data, produces a `FacebookRequest` for the next pge of data.
### getRequestForPreviousPage {#getpreviouspage}
`getRequestForPreviousPage()`  
If the response has paginated data, produces a `FacebookRequest` for the previous page of data.
</card>

Commits for Nextrek/Android/SmartCharging/endPoints/nightly/fb_SDK/docs/FacebookResponse.fbmd

Diff revisions: vs.
Revision Author Commited Message
461 FSallustio picture FSallustio Mon 03 Aug, 2015 10:04:56 +0000

Aggiunto supporto login Facebook, logout utente e modifiche (solo lato repo) all’utente e al locale.