5

At times, when I am trying to share using facebook, I get this error:

Cannot Post To Facebook The post cannot be sent because the connection to Facebook failed.

It doesn't allow me to send the post to facebook. At other times, it allows me to post. What might be the issue?

Need some help. Any idea

Edit

This is happening when I am posting the msg/text the second time. The first time, it is working fine.

It is giving me this error:

<Error>: CGImageCreate: invalid image size: 0 x 0.

But I am just posting a text, no image involved...

lakshmen
  • 28,346
  • 66
  • 178
  • 276
  • Are you trying to upload any image. Check this link http://forums.whirlpool.net.au/archive/2009338, hope it'll help – josh Dec 28 '12 at 07:59
  • possible duplicate http://facebook.stackoverflow.com/questions/12932247/ios-6-slcomposeviewcontroller-creating-a-facebook-post-with-text-and-url-no – Sahil Mittal Dec 28 '12 at 09:36
  • i am just sharing a text in facebook... – lakshmen Dec 28 '12 at 10:02
  • I am having the same issue 6 months later. Notably, if I try to share a link to a page on my own site, it fails. If I try to share another link (such as google) it succeeds. – bengoesboom Jul 31 '13 at 18:01
  • Add valid url as well, resolve the issue. – aBilal17 Dec 09 '14 at 06:48

3 Answers3

3

I faced the same error when was trying to share text with url link, but url was to localhost. Looks like Facebook validates and prerender links when posting from external sources and fails if url is invalid for any reason. SLComposerViewController returned with ok status btw. So always check your share content to find problem.

If you are posting the same text second time, maybe Facebook goes on validating it also (like in Twitter) to prevent duplications. Though it worked for me now, so maybe Facebook changed something in that context since you posted this question.

Ilya Puchka
  • 141
  • 1
  • 9
2

The real problem is that when you try to post only text, facebook throws a error, because it treats it like another post, which is not allowed in succession. Its allowed only after some time. So we cannot do much about it.

But if you attach a image, then you can post n number of times from your app, and facebook will not throw any error, because, when you post with an image for first time, it adds a post, but after that, it just starts adding photos to the album. So your post will be only one.

Hope it is clear

Ranjit
  • 4,576
  • 11
  • 62
  • 121
-3

I had the same problem, trying and failing to post a photo on Facebook, using my iPhone 5. The solution - at least in my case - was simple. I have several Wifi networks in my house, and in order to post the picture I had to change the Settings on my iPhone to a different network. As soon as I did, I was able to post the picture.