2012-01-24 20 views
0

我正在發佈到Facebook上的iOS應用程序。我有它工作正常,但不知何故它已停止工作。我在這一點上,用戶身份驗證和所有的多數民衆贊成罰款它只是不斷給我這個錯誤,當我嘗試發佈至Facebook「的帖子的操作鏈接必須是合法的URL」 下面是我的職位facebook的帖子動作url error

currentAPICall = kDialogFeedUser; 
    SBJSON *jsonWriter = [[SBJSON new] autorelease]; 

    // The action links to be shown with the post in the feed 
    NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys: 
                 @"someName",@"name",@"www.validurl.com",@"link", nil], nil]; 
    NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks]; 

    // Dialog parameters 
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
            shareInfo.facebookShareText, @"name",//name is heading with link to above 
            @"text text text", @"caption",// caption makes text grayed out 
            @"more wonderful text", @"description",// block text for the share 
            shareInfo.shareUrlShort, @"link",//actual link 
            shareInfo.facebookShareImage, @"picture",//url of picture to be displayed 
            actionLinksStr, @"actions", 
            nil]; 

    //the post's action links must be valid urls 
    //make post to wall feed 
    [_facebook dialog:@"feed" 
         andParams:params 
        andDelegate:self]; 
代碼

如果我從params中刪除了actionLinksStr,那麼這個帖子會工作,因爲錯誤表示它中的鏈接無效。這已經工作了好幾個月,但當我今天嘗試時就停止了,我似乎無法再次恢復工作。有沒有人有任何想法,爲什麼這個錯誤突然開始發生,沒有改變實際的共享代碼?傳入動作鏈接的URL是絕對有效的。任何幫助將非常感謝 編輯:只是要標記這是一個錯誤Facebook的開發網站。看看我能否從那裏得到任何反饋。對我來說仍然是個謎

回答

0

請確保您使用的是有效的URL。在上面的代碼示例中,將www.validurl.com更改爲完整的URL:http://www.validurl.com