2012-06-29 123 views
-2

我可以在朋友的Facebook牆上張貼消息,但我想張貼圖片。我需要添加到我的代碼中?使用Facebook SDK在朋友的牆上張貼圖片

這裏是我當前的代碼:此

[[FBRequestWrapper defaultManager] sendFBRequestWithGraphPath:_graphPath params: 
    [NSMutableDictionary dictionaryWithObject:@"Post on wall :)" forKey:@"message"] 
andDelegate:self]; 

回答

0

一種解決方案是張貼到用戶的照片專輯的標題。要做到這一點,你需要額外的參數添加到字典:

[[FBRequestWrapper defaultManager] sendFBRequestWithGraphPath:_graphPath params: 
    [NSMutableDictionary dictionaryWithObjectsAndKeys:@"Post on wall :)", @"message", image, @"source"] andDelegate:self]; 

image是你想發佈UIImage

您還需要確保_graphpath指向用戶相冊:@"me/photos"

相關問題