Admittedly, there are dozens of related questions to this:
- facebook-javascript-connect-with-localhost-domain
- facebook-development-in-localhost
- given-url-is-not-permitted-by-the-application-configuration
- facebook-share-dialog-failing-to-recognize-custom-reference-objects-when-posting
Unfortunately, none of them solves my problem.
I'm trying to publish custom open graph stories using the Share Dialog - so I don't have to ask users for post permissions (at some point down the line we may automate this) from my web app using the javascript SDK.
Basically I have a custom action called take: "my-app-namespace.take" and objects hosted at http://dev.myapp.com:3000/open/actions/:action_name. Each of these actions has the requisite metadata to describe itself.
<meta property='fb:app_id' content='app_id'/>
<meta property='og:type' content='my-app-namespace:take'/>
<meta property='og:title' content='my_object_title'/>
<meta property='og:image' content='an_image'/>
<meta property='og:url' content='self_url'/>
When the share button gets clicked the following Javascript is called:
FB.ui({
method: 'share_open_graph',
action_type: 'my-app-namespace.take',
action_properties: JSON.stringify({
object:'http://dev.myapp.com:3000/open/actions/renewable_energy'
})
}, function(response){});
And after a lot of fiddling I haven't been able to get anything other than the following:
Given URL is not allowed by the Application configuration: One or more
of the given URLs is not allowed by the App's settings. It must match
the Website URL or Canvas URL, or the domain must be a subdomain of
one of the App's domains.
My production app is hosted at https://myapp.com
. My development URL is http://dev.myapp.com:3000
. The development app is registered as a test app for the production app. I've created the Facebook Actions, Objects, and Custom stories in both the production and development app. They also have their own namespaces, which are dynamically generated (ie the development namespace will always be used for dev.myapp.com:3000
.).
Below is a screenshot of my development app settings:
I don't understand what's causing this error. I can login and be redirect fine from my local setup. Does it not like the object or action?