I am making a Facebook API request to return all album names from a specific Facebook group. I am returning an array of dictionaries with 3 keys / values, one of which is the key "name" that maps to the album name, as well as the keys "id" and "created_time".
The only problem is that for some reason I am returning duplicates of the "nominal" values of the albums ... but only a couple. And when I go to the Facebook page, there is only one copy of this album, not a single duplicate.
In addition, their “id” values are different, but this is only the first dictionary from the duplicate group that has a Facebook identifier that actually indicates valid data, other Facebook identifier values simply do not return anything when you execute the Facebook graph with them, so this is the first of the duplicates i want.
How can I remove these useless duplicate dictionaries from my array and save the one that has a valid Facebook id? Thank you :)
source
share