0
我質疑Facebook的用戶配置文件來訪問用戶語言裏GraphObject並獲得語言如何使用Facebook的PHP SDK V4
Facebook\GraphObject Object
(
[backingData:protected] => Array
(
[0] => stdClass Object
(
[id] => 106059522759137
[name] => English
)
[1] => stdClass Object
(
[id] => 105673612800327
[name] => German
)
[2] => stdClass Object
(
[id] => 106049856092338
[name] => Urdu
)
)
)
我想通過下面的代碼來訪問屬性如下回應Facebook\GraphObject
,但無法獲得語言的數組:
$languages = $Usergraph->getProperty("languages");
$languages_array = array();
print_r($languages);
foreach ($languages as $language){
$languages_array[] = $language->getProperty('name');
}
print_r($languages_array);
有沒有其他辦法可以得到語言的信息