How to upload the Users profile pic and how to fetch that profile pic from another users device?

假装没事ソ 提交于 2019-11-28 14:14:08

You should update user's blobID using request with QBUpdateUserParameters after blob's uploading:

      [QBRequest TUploadFile:imageData fileName:@"arrow.png" contentType:@"image/png" isPublic:YES successBlock:^(QBResponse *response, QBCBlob *blob) {

            QBUpdateUserParameters *userParams = [QBUpdateUserParameters new];
            userParams.blobID = blob.ID;

            [QBRequest updateCurrentUser:userParams successBlock:^(QBResponse * _Nonnull __unused response, QBUUser * _Nullable user) {
            } errorBlock:^(QBResponse * _Nonnull response) {

            }];

        } statusBlock:^(QBRequest *request, QBRequestStatus *status) {

        } errorBlock:^(QBResponse *response) {
        }];
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!