2012-10-23 54 views
2

我在我的代碼中成功集成了Facebook登錄。現在想在牆上張貼。Facebook牆貼錯誤:OAuthException

下面是錯誤:

FBRequest didFailWithError:The operation couldn’t be completed. (facebookErrDomain error 10000.) Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0xeaf9870 {error=<CFBasicHash 0xeaf9770 [0x20eb400]>{type = mutable dict, count = 3, 
entries => 
    2 : <CFString 0xead54f0 [0x20eb400]>{contents = "type"} = <CFString 0xead6470 [0x20eb400]>{contents = "OAuthException"} 
    3 : <CFString 0xead4610 [0x20eb400]>{contents = "message"} = <CFString 0xead4660 [0x20eb400]>{contents = "(#200) This API call requires a valid app_id."} 
    6 : <CFString 0xead4180 [0x20eb400]>{contents = "code"} = 200 
} 
} 

// CODE

[_facebook requestWithGraphPath:[NSString stringWithFormat:@"/%@/feed",[defaults objectForKey:@"FBUDID"]] 
          andParams:variables 
         andHttpMethod:@"POST" 
         andDelegate:self]; 

我已經檢查的AppID &密鑰。

請幫忙。謝謝

+0

它只能是appid相關的問題。請檢查,因爲Facebook本身返回appid問題。嘗試創建另一個應用程序並檢查該appid。或者把你的appid放在這裏,以便我們可以檢查該應用程序ID。 –

+0

我已經檢查過另一個appid(新創建)。但獲得相同的迴應。這是我的問題還是fb? 「請檢查爲Facebook本身返回appid問題」是什麼意思? –

+0

Facebook永遠不會謊言。你可以分享你的appid嗎?我可以檢查。 –

回答

3
NSMutableDictionary *params = [[[NSMutableDictionary alloc] init] autorelease]; 
[params setObject:@"status" forKey:@"type"]; 
[params setObject:@"Write your message here to post" forKey:@"message"]; 
[_facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self]; 

使用上面的代碼可以完成向自己(已登錄的用戶)發送消息。如有任何疑問,請告知我。