I am trying to use AJAX flags in an iFrame (more specifically, Facebook app) but receive the following error:

An HTTP error 0 occurred.
URL?fb_canvas_destination=node%2F18&token=ead76052ee4ff3a83875cb2ffbed11b9

I suspect it is because of a cross-origin (cross-domain) issue.

Can AJAX flags used or will I be forced to use normal links?

Comments

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

How are you obtaining the token for the link?

notluap’s picture

The token is being supplied by Views; however, I have this error when flagging content directly on a node as well.

joachim’s picture

It sounds like your setup is too complex for me to reproduce. Can you try debugging what happens on the server during the ajax request?

notluap’s picture

AJAX flags do not work in iFrames (facebook canvas app) when third party cookies are disabled in the browser. If you enable third party cookies, they work. However, most browsers are switching to disabled third party cookies by default now, so flag links are broken for most users.

joachim’s picture

Version: 6.x-2.0-beta5 » 7.x-3.x-dev
Category: support » bug

Is that AJAX flags for anon users, or for all users?

I'm pretty sure that for anon users, the cookie is essential.

notluap’s picture

This is for authenticated users.

joachim’s picture

I'm really not familiar with how Flag uses cookies at all, but I would expect that if they're being for auth users too, then there's a reason for it.

joachim’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing old bugs where no further information was supplied.