简体   繁体   中英

Azure ACS Facebook Error 191 redirect_uri is not owned by the application when Liking a page

I'm using the Facebook C# SDK to post a Like to Facebook from my ACS-secured web application but I'm getting the 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.

I believe the reason for this is because the url for the page I'm liking does not match the Facebook App Domain.

Details:

  • The page I'm trying to "Like" is (for example) http:// mysite.com/Story.aspx.

  • In ACS, the link to my secure login page is https:// mysite-acs.accesscontrol.windows.net/.

  • In Facebook, my app domain is mysite-acs.accesscontrol.windows.net and the Site URL under the "Website with Facebook Login" is: https:// mysite-acs.accesscontrol.windows.net/

  • The page I'm liking has the correct "og" tags and is on an unsecured page.

Is there any way I can get Facebook Like's working with ACS?

UPDATE: I've found a (temporary) solution.

I've found a workaround that allows me to have multiple Facebook App Domains but it is definitely not a perfect solution. The workaround is to specify the ACS url and the site url in the App Domains box. Then, under Website with Facebook Login I've entered the ACS url in the Site URL box, then, under Mobile Web, I've entered the site url in the Mobile Site URL box. Now the link on Facebook works perfectly as Facebook can see the page on my site. I'm not going to mark the question as solved until I find the real solution, but hopefully it can help someone if they are stuck. Thanks for your responses. Much appreciated!

This is where you need to use a CNAME to point to your Azure site if you can. You do have conflicting domains which facebook will not allow. You can either add the accesscontrol.windows.net as your domain in Facebook or setup a CNAME in your DNS provider to point to accesscontrol.windows.net from 'mysite.com'.

Those are your options.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM