I have an app that shows the share popup.
I have encountered a problem when trying to get it working form a different server.
I get the following error:
Error An error occurred with myapp. Please try again later.
API Error Code: 191 API Error Description: The specified URL is not
owned by the application
Error Message: redirect_uri is not owned by
the application.
How can I enable it to work from all servers? no matter if they are mine or not?
Any suggestions?
Thanks in advance.
Note:
I would like it to be via the JS SDK.
Facebook apps can only work with one main domain.
The main domain is derived from either the "Site url" or the "Mobile web url" as defined in the app settings page in the Developers application.
You can however add subdomains for that same domain.
For example, let's say your "Site url" is http://app.example.com, you can add more subdomains which you want to use with facebook by adding them to the "App Domains" field in the settings page (basic tab).
You can add subdomains like: http://sub1.example.com or http://example.com.
If you try to add a url that does not derive from that you should get the following error message when trying to save the settings:
Error
DOMAIN_YOU_ADDED must be derived from your Site URL or your Mobile Web
URL.
Edit
You have a problem if you want to use the FB.ui method.
The fb sdk will only accept usage from your own domain, and if you load an iframe from your own domain then the parent window (which is of another domain) won't be able to communicate with that iframe (same origin policy).
What you should be able to do is use the direct url of the feed dialog:
http://www.facebook.com/dialog/feed?
app_id=123050457758183&
link=http://developers.facebook.com/docs/reference/dialogs/&
picture=http://fbrell.com/f8.jpg&
name=Facebook%20Dialogs&
caption=Reference%20Documentation&
description=Using%20Dialogs%20to%20interact%20with%20users.&
redirect_uri=http://www.example.com/response
You can open that in a new window/tab, or if it's an action of a user click then even open a pop-up.
But you won't be able to use the iframe dialog of the sdk.
Related
I am trying to set up my Facebook app, but I keep getting error messages when I try to input my app domain.
This is the first error message that I receive.
"This must be derived from Canvas URL, Secure Canvas URL, Unity Binary URL, Site URL, Mobile Site URL, Page Tab URL or Secure Page Tab URL. Check and correct the following domains: www.livelocalandprosper.com"
So I tried adding an "s" after the http and got an error message that said that "top level domains are not allowed".
I also tried using the web app host site's URL, but it wouldn't accept that either. I got the same error message about top level domains.
I have asked the web app host and my website provider, but didn't get any helpful answers there.
Could someone please enlighten me on what I need to do?
Before you can fill in a domain in the app settings, you need to add a Platform, such as a Canvas app, and add the appropriate URL.
i.e. I have a test app, and after adding the Canvas app URL http://bithoop.la/canvas.php?ref=facebook and saving it, I can add bithoop.la to the domain box.
https://www.evernote.com/shard/s53/sh/66259600-af67-46de-b34c-a9cb0f0cf319/db0384a2fdbe7c7a9cea57bdaafad84b
I have a wordpress blog and am trying to integrate the facebook page publish version 2 app and keep getting 2 errors, one of WP:
Facebook returned an error: The site URL in your Facebook application settings does not match your wordpress blog URL
And on FB app creator when putting in the app domain:
This must be derived from Canvas URL, Secure Canvas URL, Site URL, Mobile Site URL, Page Tab URL or Secure Page Tab URL. Check and correct the following domains: mywpsite.com
I have not used any http:// just the domain name.
I updated to v2 of facebook plugin, deleted the old version 1, made sure my domain name didn't have upper case, deleted the app in FB and started again and still I get this error.
When I put in the app id into wp plugin the grant access rights button stays grayed out as well, imagine that's because the app is still not set up correctly.
Any help on why I keep getting these errors would be very useful.
Thanks
Andrew
Click the '+Add Platform' box below and depending on the app you want to add, in this case I assume click 'Website', and then add the website's URL to Site URL. This will now allow you to save the URL properly.
I'm aware this is a very frequently asked question but I'm really new to this whole app development thing.
I am the admin of a facebook page and I want to add a tab to the side of the page. So I followed facebook's instructions and created the page tab, but when I tried to access the "add to page" dialog box, I got API Error Code 191:
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.
The URL I was using for the box to appear was: https://www.facebook.com/dialog/pagetab?app_id=317467938291427&display=popup&next=https://www.facebook.com/287sqnatc/contact
(The contact at the end is the URL for the app I wish to add.)
Where have I gone wrong, and can someone explain it in simple 5-year-old terms?
next (or redirect_uri) parameter you pass to Add Page Tab Dialog should contain either URL owned by your application or special URL https://www.facebook.com/connect/login_success.html (intended to be used in desktop applications).
You can use FB.ui method of JS-SDK with method pagetab as shown in example of Add Page Tab Dialog documentation this will automatically provide redirect_uri for dialog and allow user to add page tab without leaving your application.
The following code generates a link that when clicked will popup a facebook dialog, and once the user authenticates to facebook, they can share to their wall.
<a href="http://www.facebook.com/dialog/feed?app_id=<APP_ID>&message=<MESSAGE>&caption= <CAPTION>&link=<LINK>&display=popup&redirect_uri=<REDIRECT>" class="share-icon facebook popup" rel='Share via Facebook'></a>
I would like for the same dialog to be generated within my page using an iframe. I attempted to load it like this:
<iframe src="http://www.facebook.com/dialog/feed?app_id=<APP_ID>&message=<MESSAGE>&display=iframe&access_token=ACCESS_TOKEN&redirect_uri=<REDIRECT>&show_error=true&caption=<CAPTION>&link=<LINK>"/>
The popup works fine. But, when I try the Iframe, it loads the following error:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.
Which of course seems wrong, because it's the same redirect_uri in both links.
The end result I want, is the share to be in page, and not be a popup. Any suggestions?
In the app settings (specifically Settings -> Basic -> Basic Info), is the domain of the redirect_uri specified in the "App Domain" field? In general, I get that error when I fail to do that.
(And as to why that might be happening, Facebook treats iframes much more strictly than new windows.)
yep, getting the 191 error.
I've researched and found this question to be helpful:
Facebook API error 191
My URL looks like:
https://www.facebook.com/dialog/oauth?client_id=&redirect_uri=http%3a%2f%2flocalhost%2fFb.201109Birthday%2fOAuth2.aspx
However, I get an error:
API Error Code: 191 API Error Description: The specified URL is not
owned by the application Error Message: Invalid redirect_uri: Given
URL is not allowed by the Application configuration.
I've read everywhere that the urls must match up to what's listed in the application's setting page. I've got
App Domain = localhost
Canvas Url = http://localhost/Fb.201109Birthday/Birthday.aspx?
Secure Canvas Url = http://localhost/Fb.201109Birthday/Birthday.aspx?
I've also tried local.facebook-apps.com (replaced "localhost" everywhere above with "local.facebook-apps.com") with a hosts file entry to point to 127.0.0.1. But all of these scenarios still give the 191.
Remove the Birthday.aspx from the Canvas URLs.
I was also getting this error when i created a facebook application that was going to be installed onto a tab on a fan page. It turns out that when i first created my facebook application i only filled out the section for "Page Tab" but i didn't fill out the section for "App on Facebook".
i didn't fill out the App on Facebook section because i didn't want users trying to add the app from the app profile page. Anyway, it turns out that by not filling out the App on Facebook section and adding a canvas URL and secure canvas URL i was getting the Error: 191 when trying to make a javascript call to FB.Login().
Once i filled out the App on Facebook section the error went away.
Filling up the "App on Facebook" page, with Canvas url, ended with /
solvet it for me
ex: canvas url.
above issue can be removed via providing the URL for the web site or localhost you are working on, at https://developers.facebook.com/apps/ under Edit-->Website with Facebook Login
Web forwarding occurs 191 problem.
I used web forwarding for app's domain.
I had problem 191 and solved by fixing original url.