Page 1 of 5

Refused to autofill iframe with different origin - FB API Error

Posted: Fri Jul 25, 2014 4:00 am
by Anil Sagar

Hi, after the recent appery update, I have been getting this error in using the FB api . This error was not there before the appery update. Could pls help me check what's wrong? Although app works fine and moves ahead with the next pages but this error shows in the console.

"Refused to autofill iframe with different origin"


Refused to autofill iframe with different origin - FB API Error

Posted: Fri Jul 25, 2014 7:49 am
by Anil Sagar

I am not sure but maybe this error is from an html component where I am trying to insert a facebook share and like buttons as described on https://developers.facebook.com/docs/... where FB is suggesting to include the following code as:

Include the JavaScript SDK on your page once, ideally right after the opening 'body' tag.

some codeA from the above URL

Place the code for your plugin wherever you want the plugin to appear on your page.

some other codeB from the same URL

I have put both codes in the same html component, which I don't think is correct. How can I put the code meant for page 'body' at the right place?

I think this is the code which did not give error before recent appery update but it's giving an error now as stated in the first post.


Refused to autofill iframe with different origin - FB API Error

Posted: Fri Jul 25, 2014 9:12 am
by Maryna Brodina

Hello!

Could you clarify when exactly this error appears? What Facebook plugin do you use?


Refused to autofill iframe with different origin - FB API Error

Posted: Fri Jul 25, 2014 9:43 am
by Anil Sagar

I am using fb api available on appery and fb share/like buttons as described above. My app provides login through fb credentials and on the 2nd page one can see some user data. On the 2nd page fb share and like buttons are there. As soon as this page loads, I see the above error in the browser console.


Refused to autofill iframe with different origin - FB API Error

Posted: Sat Jul 26, 2014 6:20 am
by Anil Sagar

Awaiting help on this pls


Refused to autofill iframe with different origin - FB API Error

Posted: Sat Jul 26, 2014 6:28 am
by Illya Stepanov

Hi Anil,

It's hard to say what is wrong here, could please provide us with a public app link (http://devcenter.appery.io/documentat...) and steps to reproduce?


Refused to autofill iframe with different origin - FB API Error

Posted: Sat Jul 26, 2014 8:54 am
by Anil Sagar

Hi Illya, I will try sharing the public link soon but it will need me to add your FB_id into my DB. We can try that but it will be slightly cumbersome.

So I have tried a few things at my end. When I removed the html component which I was using to display FB share and like buttons, the error disappeared.

This means the error is not with FB API but is with how I place the share and like button html on my app page.

So request your help on the following - as I stated above:

FB is suggesting to include the following code as:

Include the JavaScript SDK on your page once, ideally right after the opening 'body' tag.

some codeA from the above URL

Place the code for your plugin wherever you want the plugin to appear on your page.

some other codeB from the same URL

I have put both codes in the same html component, which I don't think is correct. How can I put the code meant for page 'body' at the right place?


Refused to autofill iframe with different origin - FB API Error

Posted: Sat Jul 26, 2014 8:57 am
by Illya Stepanov

Anil,

Please try to describe how you've added this to your page? I will try to reproduce it.


Refused to autofill iframe with different origin - FB API Error

Posted: Sat Jul 26, 2014 9:05 am
by Anil Sagar

I am simply adding an html component on a page and then adding the code received on https://developers.facebook.com/docs/... by pressing 'get code' there.

It's just that I have no way to put codes meant for header and body tags separately in the html component.

Once I get this working in a simple html component, my end goal is to put this html code in a grid which will repeat itself depending on the array in my DB collection.

This will then allow me to share the product bought (data from DB array) onto facebook page of the buyer.


Refused to autofill iframe with different origin - FB API Error

Posted: Sun Jul 27, 2014 9:37 am
by Anil Sagar

Hi Illya, awaiting your help on this pls