2013-03-20 13 views
5

Sto condividendo un video su Facebook utilizzando Facebook SDK 3.1.1. Ho menzionato il codice qui.La condivisione dei video su Facebook non riesce

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]; 

Stava funzionando correttamente prima. Ricevo l'ID video condiviso in risposta ogni volta che avvio una richiesta di video di caricamento. Ma continuo a ricevere il seguente messaggio quando controllo il mio profilo su FB nelle notifiche. Non è stato possibile elaborare il video. Visitare la pagina della guida video per informazioni su problemi comuni

Ho provato questo con diversi AppId. Il caricamento dei video sta funzionando anche se lo carico tramite il sito web di Facebook. Per favore aiutami con questo. È urgente.

Grazie in anticipo.

+2

Hai controllato con gli SDK facebook anziani – Khushboo

+2

sì ho. affrontare lo stesso problema anche con quello. – Swati

+3

sì è urgente. Sto facendo dalla mia app per iOS. Devo inviarlo all'App Store con questa funzionalità inclusa. – Swati

risposta

Problemi correlati