2012-08-22 157 views
0

好吧,我可以确认会话是活动的。我可以确认该令牌在2012年10月21日到期,所以这不成问题。我也可以证实,我reeive类似这样的回应请求被发送到Facebook的:Facebook照片上传不张贴照片到墙

FBRequest:0x9138950

这里就是我送了Facebook的要求:

- (void)facebookPhotoUpload{ 
    UIImage *postImage = combinedImage; 
    if(combinedImage == nil){ 
     postImage = badgeImage.image; 
    } 

    NSLog(@"%@", [appDelegate.facebook expirationDate]); 

    NSMutableDictionary* params = [NSMutableDictionary dictionary]; 
    [params setObject:strMessage forKey:@"message"]; 
    if (postImage) { 
     [params setObject:postImage forKey:@"source"]; 
     [appDelegate.facebook requestWithGraphPath:@"me/photos" andParams:params 
            andHttpMethod:@"POST" 
             andDelegate:self]; 
    } else { 
     [appDelegate.facebook requestWithGraphPath:@"me/feed" andParams:params 
            andHttpMethod:@"POST" 
             andDelegate:self]; } 
} 

然后它获得此功能:

- (void)requestLoading:(FBRequest *)request{ 
    NSLog(@"Your facebook request is loading... %@", request); 
} 

并返回一个请求的内存地址。很好,所以它的工作很远。

但是我得到这之后没有其它的反应......

有没有其他人经历过这个问题呢?有谁知道如何解决这个问题?

回答

0

解决方法是在主线程上调用您的facebookPhotoUpload请求。在另一个线程上运行它导致它永远不会正确地获得对Facebook的请求。另外这里是另一个相同/类似问题的stackoverflow问题,以及为什么存在这种行为的更深层次的解释。 Facebook request thread problem