Search code examples
javascriptfacebookfacebook-graph-apifacebook-canvas

"Facebook CDN" not allowed for og:image, while sharing a Canvas app


We have created a Facebook Canvas App, which can be found at this address: https://apps.facebook.com/hiphopexpress/

When sharing a Canvas app, Facebook will retrieve the OG:Meta it has added as a result of app settings. The icon is a png file with transparency, set at 1024x1024 as per Facebook requirements.

The problem I'm incurring into is that as you can see from the screenshots below, the image will not be included when sharing. Additionally, the Facebook graph debugger tool shows this error:

Facebook CDN not allowed for og:image.

In the allowed domains field we have both the canvas app and the external site, which serves as a fallback for mobile users (since canvas apps aren't really responsive).

error

I tried adding the meta tag for the image to the iframe contents, but of course it won't work. It's no use even trying to add the akamai domain to the authorized ones.

enter image description here

Further explanation:

As already written above, the files are in the Facebook CDN for the sole reason that they are the result of setting the application's icon and application description. Where else should they be?

The OG meta i set in the canvas content seem to be simply ignored. My current og:image meta is only this:

<meta property="og:image" content="http://www.domain.com/html/images/favicon/bannertop.png" />

Solution

  • After further testing the issue seemed caused by the redirect mechanism (we are redirecting mobile users to a standalone app). Once we excluded Facebook bots from redirect, our meta is now being read, instead of canvas's ones.