无法在iphone sdk上的Facebook墙上上传照片

时间:2011-03-22 14:24:38

标签: iphone cocoa-touch facebook ios4 facebook-graph-api

在我的iPhone应用中,我正在尝试使用this code.

在Facebook墙上上传照片

我在模拟器中使用时效果很好,但是当我尝试从设备上传时,它在Facebook墙上没有显示任何内容。

编辑:我在设备上运行时在控制台中出现以下错误:

sendToPhotosFinished方法:

Send To Photos Finished
ResponseString : {"error":{"type":"OAuthException","message":"(#1) An unknown error occurred"}}
ResponseJSON : {
             error =     {
             message = "(#1) An unknown error occurred";
             type = OAuthException;
             };
}
Photo id is: (null)

并在getFacebookPhoto方法中:

Got Facebook Photo: {"error":{"type":"OAuthException","message":"(#803) Some of the aliases you requested do not exist: (null)"}}

在模拟器中运行时,我获得了所有值。

可能有什么不对?

1 个答案:

答案 0 :(得分:0)

您是否传递了正确的API密钥?

我认为问题在于您没有传递API密钥,因此它会提供null

这就是你的问题所在。

http://www.insidefacebook.com/2010/11/17/api-test-user-developers/