def process_photo_tags(tags):
    if ('error' in tags):
        print('Error = ', error)
        raise Exception('Error in Response')
    if ('data' not in tags):
        return
    while (len(tags['data']) > 0):
        for tagged_person in tags['data']:
            name = tagged_person['name'].encode('utf-8')
            if (name == OWNER_NAME):
                continue
            if (name in photos_together):
                photos_together[name] += 1
            else:
                photos_together[name] = 1
        if (('paging' in tags) and ('next' in tags['paging'])):
            request_str = tags['paging']['next'].replace('https://graph.facebook.com/', '')
            request_str = request_str.replace('limit=25', 'limit=200')
            tags = graph.get(request_str)
        else:
            tags['data'] = []
def process_photo_tags(tags):
    if ('error' in tags):
        print('Error = ', error)
        raise Exception('Error in Response')
    if ('data' not in tags):
        return
    while (len(tags['data']) > 0):
        for tagged_person in tags['data']:
            name = tagged_person['name'].encode('utf-8')
            if (name == OWNER_NAME):
                continue
            if (name in photos_together):
                photos_together[name] += 1
            else:
                photos_together[name] = 1
        if (('paging' in tags) and ('next' in tags['paging'])):
            request_str = tags['paging']['next'].replace('https://graph.facebook.com/', )
            request_str = request_str.replace('limit=25', 'limit=200')
            tags = graph.get(request_str)
        else:
            tags['data'] = []