0

我正在尝试 facebook graph api 等功能likeshare我需要分享特定朋友的新闻源。新闻源可以是任何照片、视频、链接或状态更新。除了状态更新,我可以分享一切。以下是我的代码:

if ([strType isEqualToString:@"status"]) {


            [[resultArrFeed objectAtIndex:selectedIndex] objectForKey:@"message"];

            if (text == nil) {
                text = [[resultArrFeed objectAtIndex:selectedIndex] objectForKey:@"story"];
            }



            NSDictionary *dict = [resultArrFeed objectAtIndex:selectedIndex];
            NSLog(@"dic : %@", dict);
            NSString *str = [[dict valueForKey:@"actions"] valueForKey:@"link"][0];
            dic=[NSDictionary  dictionaryWithObjectsAndKeys:str,@"link",nil];
            request=[NSMutableString stringWithString: @"me/feed/"];
            //  [dic setValue:str forKey:@"link"];
            NSLog(@" %@", str);

        }

我在共享时收到以下错误:

Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xaaa9a20 {com.facebook.sdk:ParsedJSONResponseKey={
body =     {
    error =         {
        code = 1500;
        message = "(#1500) The url you supplied is invalid";
        type = OAuthException;
    };
};
    code = 400;
}, com.facebook.sdk:HTTPStatusCode=400}

我该如何解决?

4

1 回答 1

0

你应该试试下面的网址

request=[NSMutableString stringWithString: @"me/feed"];

谢谢

于 2013-01-24T12:05:04.373 回答