1
我正在一個iOS應用程序。分享視頻鏈接到Facebook ios
我需要分享一個視頻鏈接到facebook.Video將保存在我的服務器上。
我使用下面的代碼: -
params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
AppName, @"title",
AppName, @"name",
[NSString stringWithFormat:@"%@",text], @"caption",
composeViewController1.text, @"description",
Path, @"link",
[NSString stringWithFormat:@"%@%@app_icon-DEMO.png",ServerPath,URLImageFolder], @"picture",
nil];
[FBRequestConnection startWithGraphPath:@"/me/feed"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (!error) {
// Link posted successfully to Facebook
NSLog(@"result: %@", result);
} else {
// An error occurred, we need to handle the error
// See: https://developers.facebook.com/docs/ios/errors
NSLog(@"%@", error.description);
}
}];
但我得到下面的錯誤從這個
Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xc52be90 {com.facebook.sdk:HTTPStatusCode=500, com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 1500;
"error_subcode" = 1609005;
message = "This link could not be posted.";
type = FacebookApiException;
};
};
code = 500;
但是,如果我嘗試共享靜態鏈接說「www.google.com」它工作中。
我的應用程序的流程是: -
用戶將檢查在Facebook按鈕標記和飼料可在Facebook上分享和我在同一時間的應用程序。
感謝您的幫助。
如果4個案例中的任何一個是真的,我如何能夠發佈在Facebook上,如果我刪除該變量,並把「www.google.com」?問題是靜態鏈接正在工作,但如果我放置任何變量它不起作用。 – Impossible
你可以發佈你正在嘗試發佈的鏈接嗎?fb –
檢查我編輯的答案。 –