I have integrated JavaScript SDK codes from the developers at Facebook. I am looking to retrieve my user's groups.
<script>
FB.api(
"/me/groups",
function (response) {
if (response && !response.error)
{
/* handle the result */
document.getElementById("status").innerText=response;
}
});
</script>
Currently, the only variable available is "response". However, when I attempt to read it, it displays as [object Object]. My goal is to access the names of the user's groups and verify if they are part of my group or not.
According to Facebook's documentation, a group array is returned. I aim to extract this group array, but I'm uncertain about how to proceed with this task.