简体   繁体   English

在iPhone应用程序上使用FBConnect在FBDialog上附加JSON的问题

[英]Problems with attach JSON on FBDialog using FBConnect on my iPhone App

I'm trying to publish a post on the wall using FBConnect on my iPhone App, but I'm having a very stranger issue with the attach JSON. 我正在尝试在iPhone App上使用FBConnect在墙上发布帖子,但是我对Attach JSON遇到了一个非常陌生的问题。

When I use the sample JSON that FBConnect includes it works great, the code is: 当我使用FBConnect包含的示例JSON很好用时,代码为:

dialog.attachment = @"{\"name\":\"Facebook Connect for iPhone\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone\",\"caption\":\"Caption\",\"description\":\"Description\",\"media\":[{\"type\":\"image\",\"src\":\"http://img40.yfrog.com/img40/5914/iphoneconnectbtn.jpg\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone/\"}],\"properties\":{\"another link\":{\"text\":\"Facebook home page\",\"href\":\"http://www.facebook.com\"}}}"; 

But, when I change the image source URL to another image hosted on my own server, it shows me correctly the FBDialog and the preview post, but when I tap the publish button, the Dialog dismiss as usual, but the post does not appear on the wall. 但是,当我将图像源URL更改为自己服务器上托管的另一个图像时,它正确地显示了FBDialog和预览帖子,但是当我点击“发布”按钮时,对话框照常关闭,但该帖子未显示在墙。

This is the attach JSON after the changes: 这是更改后的附加JSON:

dialog.attachment = @"{\"name\":\"Facebook Connect for iPhone\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone\",\"caption\":\"Caption\",\"description\":\"Description\",\"media\":[{\"type\":\"image\",\"src\":\"http://myownserver.com/myImage.png\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone/\"}],\"properties\":{\"another link\":{\"text\":\"Facebook home page\",\"href\":\"http://www.facebook.com\"}}}"; 

Any idea of where is my mistake? 知道我的错误在哪里吗? Thanks. 谢谢。

After many attempts and no progress, I decide to try something unusual. 经过多次尝试但没有任何进展,我决定尝试一些不寻常的事情。 I changed the server where my picture was hosted... And it works! 我更改了托管图片的服务器...它可以正常工作! I do not know what caused it, but apparently the Facebook API produces some problems with some servers. 我不知道是什么原因造成的,但是很明显,Facebook API在某些服务器上会产生一些问题。

I hope this can be useful to someone. 我希望这对某人有用。 Greetings. 问候。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用iPhone应用程序中的FBConnect在我的Feed-post中添加链接? - How to include a link in my feed-post using FBConnect from iPhone app? 是否可以使用fbconnect在iPhone应用程序中无需对话就可以在墙上发布消息? - Is it possible to post a message on the wall without a dialogue in iphone app using fbconnect? 如何在我的iPhone项目中导入FBConnect文件夹? - How to import the FBConnect folder in my iPhone project? 如何在iPhone中使用fbconnect获得朋友地址 - How to get friends address using fbconnect in iPhone 尝试使用iPhone的FBConnect将视频上传到Facebook - Trying to upload video to facebook using FBConnect for iPhone 使用FBConnect iPhone SDK的键盘故障 - Trouble with keyboard using FBConnect iPhone SDK 通过Facebook使用FBConnect对iPhone应用程序进行身份验证的用户身份验证rails后端服务器 - Authentication of rails backend server for users' authenticated with iPhone app via Facebook using FBConnect 使用FBConnect在Facebook上共享我的应用 - Use FBConnect to Share my app on Facebook FBConnect:Facebook认证屏幕没有重定向到我的应用程序 - FBConnect : Facebook authent screen not redirecting to my app 我可以在FBDialog中打开URL(Facebook页面)或FBConnect中的某些内容吗? - Can I open an URL(a Facebook page) in a FBDialog or something in FBConnect?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM