2013-03-20 32 views
5

Tôi đang chia sẻ video trên facebook bằng Facebook SDK 3.1.1. Tôi đã đề cập đến mã ở đây.Chia sẻ video trên facebook không thành công

FBRequestConnection *newConnection = [[FBRequestConnection alloc] init]; 

    // for each fbid in the array, we create a request object to fetch 
    // the profile, along with a handler to respond to the results of the request 
    NSString *fbid = @"me"; 
    // create a handler block to handle the results of the request for fbid's profile 
    FBRequestHandler handler = 
    ^(FBRequestConnection *connection, id result, NSError *error) { 
     // output the results of the request 
     [self requestCompleted:connection forFbID:fbid result:result error:error]; 
    }; 

    // create the request object, using the fbid as the graph path 
    // as an alternative the request* static methods of the FBRequest class could 
    // be used to fetch common requests, such as /me and /me/friends 

    NSData *videoData = [NSData dataWithContentsOfFile:path]; 
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
            videoData, @"video.mov", 
            @"video/quicktime", @"contentType", 
            @"Video", @"title", 
            @"Video Test Description", @"description", 
            @"hello",@"subdescription", 
            nil]; 
    FBRequest *request = [[FBRequest alloc] initWithSession:theDelegate.session graphPath:@"me/videos" parameters:params HTTPMethod:@"POST"]; 
    //:FBSession.activeSession graphPath:@"me/?fields=location"]; 

    // add the request to the connection object, if more than one request is added 
    // the connection object will compose the requests as a batch request; whether or 
    // not the request is a batch or a singleton, the handler behavior is the same, 
    // allowing the application to be dynamic in regards to whether a single or multiple 
    // requests are occuring 
    [newConnection addRequest:request completionHandler:handler]; 

    // if there's an outstanding connection, just cancel 
    [self.requestConnection cancel]; 

    // keep track of our connection, and start it 
    self.requestConnection = newConnection; 
    [newConnection start]; 

Nó hoạt động bình thường trước đó. Tôi nhận được Id video được chia sẻ để phản hồi mỗi lần tôi bắt đầu yêu cầu video tải lên. Nhưng tôi tiếp tục nhận được thông báo sau khi tôi kiểm tra hồ sơ của mình trên FB trong thông báo. Không thể xử lý video của bạn. Truy cập trang trợ giúp Video để tìm hiểu về các sự cố thường gặp

Tôi đã thử điều này với các AppIds khác nhau. Tải lên video đang hoạt động mặc dù khi tôi tải video lên bằng trang web facebook. Xin hãy giúp tôi với. Cấp bách của nó.

Cảm ơn trước.

+2

có bạn kiểm tra với SDK facebook cũ – Khushboo

+2

vâng tôi có. đối mặt với cùng một vấn đề với điều đó. – Swati

+3

có nó là cấp thiết. Tôi đang làm từ ứng dụng iOS của mình. Tôi phải gửi nó cho AppStore với tính năng này bao gồm. – Swati

Trả lời

Các vấn đề liên quan