php - How to find out, if facebook ID is a user, group or page -
i wonder if there's way determine, if given id user, group or page on facebook. i've checked fql-reference, haven't found anything.
edit:
nevermind. seems, ?metadata=1 trick (if profile accessible)
as far i'm aware, there no way "type" facebook, assume know id supposed relate anyway.
the best thing can think of find attribute unique each object, , check if exists on returned data from
://graph.facebook.com/id
you want check documentation , return data best key/attribute check, quick @ docs, possible check:
- if
company
exists, assume application id - if
first_name
exists, assume user id - if
owner
exists, assume group
the advantage being once determine type of id, have data need object, whatever consequent actions.
n.b: fact don't know type, leads me believe don't have access_token
allow additional permissions. therefore you're restricted public data, sure use key not require access_token
(i.e. haven't tested this, gets returned group id object, when group private? owner may not available , may need test other keys, or allow variations)
Comments
Post a Comment