Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to retrieve metadata? #9

Closed
darrynten opened this issue Oct 16, 2014 · 3 comments
Closed

Possible to retrieve metadata? #9

darrynten opened this issue Oct 16, 2014 · 3 comments

Comments

@darrynten
Copy link

The graph API supports a request variable, metadata which brings back extra information about the object.

/me?fields=id,email&metadata=1

Is there a way to retrieve this info using this library?

In my case I'm specifically looking for the type of the object, and as far as I can tell this is the only way to do so.

@SammyK
Copy link
Owner

SammyK commented Oct 16, 2014

Yep! You can add any modifier on a GET request by using the with() method:

$me_and_meta = $fqb->object('me')
        ->fields('id', 'email')
        ->with(['metadata' => 1])
        ->get();

@darrynten
Copy link
Author

Amazing! Thanks so much

@SammyK
Copy link
Owner

SammyK commented Oct 16, 2014

No problem! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants