0

Admittedly, there are dozens of related questions to this:

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:

enter image description here

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?

Community
  • 1
  • 1
Eric H.
  • 6,894
  • 8
  • 43
  • 62
  • Try adding `dev.myapp.com` as App Domain. Is `http://dev.myapp.com:3000/` the domain used in the browser that you initialize the JS SDK under? Is `http://dev.myapp.com:3000/open/actions/renewable_energy` reachable from the “outside”, i.e. will Facebook’s servers be able to request that object via HTTP? – CBroe Mar 18 '15 at 00:25
  • I've tried adding the app domain as you suggest (and as many advise against) to no avail. Yes to your first question. No to your second question - it is just being locally developed right now. Maybe I will publish that and retry. – Eric H. Mar 18 '15 at 00:47
  • [CBroe] Thanks, I knew that would be an issue, but the error I was getting didn't match up - after finding a bad APP_ID in my (legacy) code, I was able to debug. – Eric H. Mar 19 '15 at 18:59

0 Answers0