I have created a sign in with facebook on my website and I am using facebook API and trying to find and get if the logged in user has an instagram account added to it's facebook page.
So I have a facebook page and i have added my instagram account to my page. Now when i run the following code:
$request = new FacebookRequest(
$session,
'GET',
'/{page-id}/instagram_accounts'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
I get the following response:
Facebook\GraphObject Object
(
[backingData:protected] => Array
(
[data] => Array
(
[0] => stdClass Object
(
[id] => 1404189222940042
)
)
[paging] => stdClass Object
(
[cursors] => stdClass Object
(
[before] => MTQwNDE4OTIyMjk0MDA0MgZDZD
[after] => MTQwNDE4OTIyMjk0MDA0MgZDZD
)
)
)
)
Now i'm unable to identify what is returned in the [data] that is '1404189222940042'. It's not my facebook ID, it's not my page ID, It's not my Instagram ID. What is this numeric data? Facebook says it's "A list of InstagramUser nodes" in the following link:
https://developers.facebook.com/docs/graph-api/reference/page/instagram_accounts/
So my question is: 1) What is this InstagramUser node? 2) How can I get the instagram account of the facebook page.