2009-07-02 32 views
0

不知道這是否是正確的地方張貼這個,但我已經嘗試過其他地方沒有運氣。Facebook Connect - publishUserAction模板問題

我收到錯誤:「{*actor*} just scored {*points*} points.

我的代碼是:

我的模板「提供不包括髮布的故事時,整個令牌集模板數據」

NSMutableDictionary* feedStoryParams = [[[NSMutableDictionary alloc] init] autorelease]; 
[feedStoryParams setObject:<MyBundle ID> forKey:@"template_bundle_id"]; 
[feedStoryParams setObject:[NSString stringWithFormat:@"\"points\":\"42\""] forKey:@"template_data"]; 

[[FBRequest requestWithDelegate:self] call:@"Feed.publishUserAction" params:feedStoryParams]; 

這是在用戶登錄到我的iPhone應用程序中的Facebook後(我檢查以確保會話ID在那裏)。

我已經測試過,通過從字典中刪除「points」條目進行了測試,然後它給了我正確的錯誤,指出{points}項缺失,並且是模板「{*actor*} just scored {*points*} points.」所需的。所以我也知道模板包ID是正確的。

如果有人有任何想法,爲什麼這不起作用,請讓我知道。我完全卡住:(請幫助。

謝謝!

回答

0

應該「演員」的地方出現在template_data?

+0

沒有,它會自動被Facebook基地填寫d關於會議信息 – Joel 2009-07-04 17:48:30

1

我有同樣的問題。在明確的JSON哈希把一切都修好了試着用替換

[feedStoryParams setObject:[NSString stringWithFormat:@"\"points\":\"42\""] forKey:@"template_data"]; 

[feedStoryParams setObject:[NSString stringWithFormat:@"{\"points\":\"42\"}"] forKey:@"template_data"]; 
+0

謝謝!這總是很簡單,呃? – Joel 2009-10-09 15:36:26