vansan
vansan

Reputation: 762

I want to open a facebook dialog in an iframe, instead of as a popup

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?

Upvotes: 2

Views: 1015

Answers (1)

bbrown
bbrown

Reputation: 6360

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.)

Upvotes: 1

Related Questions