I'm using actual Facebook iOS SDK and trying to post status update, with url provided.
So far I managed to post simple text status using:
[connection addRequest:[FBRequest requestForPostStatusUpdate:message] completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {// [self showAlert:message result:result error:error]; }]; [connection start];I tried to modify it so, the url would be attached and did it like this:
[connection addRequest:[FBRequest requestForPostOpenGraphObjectWithType:@"RG Training" title:@"Test Title" image:nil url:@"http://runguru.pl" description:@"Test description" objectProperties:nil] completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { if (error) [self.appDelegate showUnknownCommunicationError];}];[connection start];Unfortunately this causes error:
Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x15f7c010 {com.facebook.sdk:ErrorInnerErrorKey=Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0x15fc53f0 {NSUnderlyingError=0x15eec120 "bad URL", NSLocalizedDescription=bad URL}, com.facebook.sdk:HTTPStatusCode=200, com.facebook.sdk:ErrorSessionKey=Error says there is something wrong with URL, but what?
ليست هناك تعليقات:
إرسال تعليق