Facebook打开图表错误100

时间:2014-01-10 11:36:14

标签: ios xcode facebook-graph-api share facebook-opengraph

我使用了以下代码,始终显示错误

错误:错误Domain = com.facebook.Facebook.platform Code = 100“无法完成操作。(com.facebook.Facebook.platform error 100.)”UserInfo = 0x146472d0 {error_message =发生错误时共享动作。,app_id = 103673613161101,error_code = 100}

请帮忙。

  -(void) openGraphTest
    {
        NSDictionary* author = [self.video objectForKey:@"author"];
        NSString *description =  [NSString stringWithFormat: @"By %@", [author objectForKey:@"username"]];
        id<FBGraphObject> DiscoverObject =
        [FBGraphObject openGraphObjectForPostWithType:@"discovermeapp:talent"
                                                title:[NSString stringWithFormat: @"%@ - Episode %@",[[self.video objectForKey: @"video"] objectForKey: @"title" ],
                                                       [[self.video objectForKey: @"video"] objectForKey: @"episode_number"]]
                                                image:[[self.video objectForKey: @"video"] objectForKey: @"thumbnail_url"]
                                                  url:[[self.video objectForKey: @"video"] objectForKey: @"share_url"]
                                          description:description];

        id<FBOpenGraphAction> postAction = (id<FBOpenGraphAction>)[FBGraphObject graphObject];
        [postAction setObject:DiscoverObject forKey:@"talent"];
       // [postAction setObject:@"true" forKey: @"fb:explicitly_shared"];


        [FBDialogs presentShareDialogWithOpenGraphAction:postAction
                                              actionType:@"discovermeapp:discover"
                                     previewPropertyName:@"Discover"
                                                 handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {
                                                     if(error) {
                                                         NSLog(@"Error: %@", error.description);
                                                     } else {
                                                         NSLog(@"Success!");
                                                     }
                                                 }];
    }

0 个答案:

没有答案