我正在使用Parse移動平臺在Facebook時間線上發佈Feed。這是他們在他們的文檔中所說的:Note that if you already have the Facebook SDK installed in your app, our version of the Facebook SDK will happily work alongside it.
發佈到Facebook的鏈接使用Parse的時間線
看一看here。 The Parse SDK includes the entire Facebook SDK. All the classes are namespaced with PF_ to avoid conflicts with existing libraries. So, for example, the main Facebook object class in our SDK is PF_Facebook.
這一個完美的作品使用Facebook SDK:
- (IBAction)postFacebook:(UIButton *)sender {
self.postParams =
[[NSMutableDictionary alloc] initWithObjectsAndKeys:
@"https://developers.facebook.com/ios", @"link",
@"https://developers.facebook.com/attachment/iossdk_logo.png", @"picture",
@"Facebook SDK for iOS", @"name",
@"Here we go", @"message",
@"Build great social apps and get more installs.", @"caption",
@"The Facebook SDK for iOS makes it easier and faster to develop Facebook integrated iOS apps.", @"description",
nil];
[FBRequestConnection startWithGraphPath:@"me/feed" parameters:self.postParams HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
[self showAlert:@"Link is posted" result:result error:error];
}];
}
但是當我使用PF_FBRequestConnection,這是行不通的:
[PF_FBRequestConnection startWithGraphPath:@"me/feed" parameters:params HTTPMethod:@"POST"
completionHandler:^(PF_FBRequestConnection *connection, id result, NSError *error) {
[self showAlert:@"Link is posted" result:result error:error];
}];
在控制檯中的錯誤:
Error: HTTP status code: 403
事情是我可以發佈photo or Status
使用解析,但不是你看到的鏈接。
我很感激任何幫助。
謝謝您的回答,它真的幫了我! – edzio27
我得到一個錯誤 「[0] \t(空)\t @」 com.facebook.sdk:ErrorInnerErrorKey 「:(無摘要)\t」 –
而這個 「[1] \t(空)\t @」 com.facebook.sdk :ErrorSessionKey「:(無摘要)\t和」[2] \t(null)\t @「com.facebook.sdk:HTTPStatusCode」:(long)200「 –