def upload_profile_avatar filename
      # The Marketing API should be enabled for the APP to use this feature
      # A publish_pages permission is required.
      raise_not_provided_error unless switch_to_page

      media_info = page_client.put_picture filename
      picture_url = page_client.get_picture_data(media_info['id'])['data']['url']
      page_client.put_connections('me', 'picture', { picture: picture_url })
    end
def upload_profile_avatar filename
      # The Marketing API should be enabled for the APP to use this feature
      # A publish_pages permission is required.
      raise_not_provided_error unless switch_to_page

      media_info = page_client.put_picture filename
      picture_url = page_client.get_picture_data(media_info['id'])['data']['url']
      page_client.put_connections('me', 'picture', { picture: picture_url })
    end
AFAIK, profile avatars only provided on pages, not users